Contributions are welcome! This is a multidisciplinary project, so skillsets ranging from AI researcher to UI engineer are valuable.
Contribution ideas:
- Build something and let us know what's easy/challenging/surprising.
- Experiment with ways to embed AI directly in UIs and discover which best practices / patterns emerge.
- Look at the
batteries
(e.g.NaturalLanguageRouter
,UseTools
) and rework them / build alternate versions. - Build better dev tools. The Ink app is pretty rough. Maybe we want a web app?
- Build out other currently-unimplemented ideas from the aspirational README.
If you implement a new feature, it's best to add an example.
Follow these steps to make a new demo.
-
Create a new file at
packages/examples/src/my-demo-directory/index.tsx
. -
Add an entry for your demo to
packages/examples/package.json
:"scripts": { "demo:your-demo": "tsx src/my-demo-directory/index.tsx", }
-
Add the your demo to that file. For example:
import * as AI from 'ai-jsx'; import { ChatCompletion, SystemMessage, UserMessage } from 'ai-jsx/core/completion'; import { showInspector } from 'ai-jsx/core/inspector'; function App() { return ( <ChatCompletion> <SystemMessage>You are an assistant who only uses one syllable words.</SystemMessage> <UserMessage>Why is the sky blue?</UserMessage> </ChatCompletion> ); } showInspector(<App />);
-
Run the demo with:
# Make sure you've run this at least once since cloning the repo, # or making any changes in packages/ai-jsx yarn build yarn workspace examples run demo:your-demo
To publish:
-
During your PR:
- Make sure the
version
field inpackages/ai-jsx/package.json
has been incremented in accordance with semver. - Update the changelog. In addition to adding a section describing the changes in the new version, be sure to update the heading for the previous version with a link to the commit for that version, for example:
## [0.9.2](https://github.com/fixie-ai/ai-jsx/commit/219aebeb5e062bf3470a239443626915e0503ad9)
- Make sure the
-
After your PR is merged:
cd packages/ai-jsx
npm publish
This will create a bunch of temp files in your current working directory. To remove them, run git clean -fd
.