You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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! :)
This discussion was created from the release v0.2.6: Custom Providers.
Beta Was this translation helpful? Give feedback.
All reactions