This is a template to make components for Project J.A.I.son.
A component is something the core of Project J.A.I.son uses to generate responses. These are hot-swappable implementations designed for users to pick and choose which e.g. model they want to use in the project. These are mainly intended to be adapters for models and APIs, but these can be extended to anything.
These components support AND ENCOURAGE the use of data-streaming. When possible, model implementations should stream back their results using python generators
jaison-core will use either start.bat for Windows or start.sh for Unix-like systems to load the right virtual environment and run the component on the specified port.
The actual component runs a GRPC server that uses the configured component to transform data.
-
Minimum dependencies are found in
requirements.txt. You can install them usingpip install -r requirements.txt. Please ensure you do this in a (python or conda) virtual environment. -
Update
metadata.yamlwith your project-specific information. -
Implement your model in
src/custom/__init__.py. Pick out the associated function that was configured in step 2 and implement that one. Other ones can remain blank. -
Update the
startscripts to run the component starting from the root directory. This should include loading the right virtual environment given the user followed the setup steps you define in the next step. If your component can only run on either Windows or Unix machines,metadata.yamlshould reflect this and the associated start script won't be used. -
Fill out the
README-template.mdwith details about this project, and most importantly how to set up the project with the correct virtual environment to run the component. If there are other special restrictions like hardware or other special setup instructions, state them there. -
Cleanup the project (replacing this
README.mdwith the newREADME-template.md, removingCONTRIBUTING.md, etc.). -
Upload to Github and share your work on the Discord server so we can add you component to the list of implementations for everyone to use!
I am accepting contributions for this package. If you would like to contribute, please refer to CONTRIBUTING.