4. (If you wish to use non-OpenAI models): Make sure you have installed the relevant packages. For more info, see below. You can also come back to do this later.
Currently we support OpenAI models GPT3.5 and GPT4, Anthropic model Claudev1, Google PaLM model `text-bison-001`, and (locally run) [Dalai](https://github.com/cocktailpeanut/dalai)-served Alpaca.7b at port 4000.
For OpenAI models, move to Step 2. To use Anthropic and Google PaLM models, you need to install the relevant Python package in your Python environment before you can run those models:
- For [Anthropic](https://github.com/anthropics/anthropic-sdk-python), do `pip install anthropic`.
- For [Google PaLM](https://github.com/google/generative-ai-python), do `pip install google-generativeai`. (Note that PaLM officially supports Python 3.9+, but there's a minor type error that's easily fixed to make it work in Python 3.8.8.)
- For Dalai, [install `dalai`](https://github.com/cocktailpeanut/dalai) and follow the instructions to download `alpaca.7b`. When everything is setup, run:
### 2. Set API keys (OpenAI, Anthropic, Google PaLM)
If you're just messing around, we recommend you input the API keys manually via the Settings button in the top-right corner. If you'd prefer to not be bothered every time you load ChainForge, you can set them as environment keys:
- For OpenAI models, you can set an environment variable with your OpenAI key:
https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety . For Mac, for instance, follow:
> You can add the `--dummy-responses` flag in case you're worried about making calls to OpenAI. This will spoof all LLM responses as random strings, and is great for testing the interface without accidentally spending $$.
This script spins up two servers, the main one on port 8000 and a SocketIO server on port 8001 (used for streaming progress updates).
If you want to contribute, welcome! Please [fork this repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) and submit a [Pull Request](https://github.com/ianarawjo/ChainForge/pulls) with your changes.
If you have access to the main repository, we request that you add a branch `dev/<your_first_name>` and develop changes from there. When you are ready to push changes, say to address an open Issue, make a Pull Request on the `experimental` repository and assign the main developer (Ian Arawjo) to it.