v0.2.6: Custom Providers
For weeks, many of you have asked for the ability to query custom models or providers in ChainForge. Given how fast this space is evolving --and also how idiosyncratic some of these APIs are --we decided it best to make ChainForge extensible.
You can now add custom providers by writing simple completion functions in Python. Custom providers will be added to the list of providers in Prompt, Chat Turn, and LLM Scorer nodes. Added provider scripts are automatically cached, and persist across runs of ChainForge.
Here's an example script to add the Cohere API, complete with a JSON schema defining custom settings options. You add this script by simply dropping it into the new "Custom Providers" tab in the ChainForge Settings window:
You can then query the custom provider like normal:
Note that only the local version of ChainForge (via pip install
) supports custom providers.
For extensive information, see the new "Adding a custom provider" page in the docs.
As always, let us know if you encounter any problems! :)