Skip to content

chore: update docs to reflect changes to anthropic provider #381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions docs/docs/04-alternative-model-providers.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Alternative Model Providers


## Usage

GPTScript can be used against alternative models that expose an OpenAI compatible API or have a provider shim available.
Expand All @@ -16,24 +15,29 @@ Say hello world
To use a model that requires a provider shim:

```gptscript
model: claude-3-haiku-20240307 from github.com/gptscript-ai/anthropic-provider
model: claude-3-haiku-20240307 from github.com/gptscript-ai/claude3-anthropic-provider

Say hello world
```

### Authentication

For OpenAI compatible providers, GPTScript will look for an API key to be configured with the prefix `GPTSCRIPT_PROVIDER_`, the base domain converted to environment variable format, and a suffix of `_API_KEY`.
As an example if you are using `mistral-large-latest from https://api.mistral.ai/v1`, the environment variable would be `GPTSCRIPT_PROVIDER_API_MISTRAL_AI_API_KEY`
For OpenAI compatible providers, GPTScript will look for an API key to be configured with the
prefix `GPTSCRIPT_PROVIDER_`, the base domain converted to environment variable format, and a suffix of `_API_KEY`.
As an example if you are using `mistral-large-latest from https://api.mistral.ai/v1`, the environment variable would
be `GPTSCRIPT_PROVIDER_API_MISTRAL_AI_API_KEY`

Each provider shim has different requirements for authentication. Please check the readme for the provider you are trying to use.
Each provider shim has different requirements for authentication. Please check the readme for the provider you are
trying to use.

## Available Model Providers

The following shims are currently available:

* [github.com/gptscript-ai/azure-openai-provider](https://github.com/gptscript-ai/azure-openai-provider)
* [github.com/gptscript-ai/azure-other-provider](https://github.com/gptscript-ai/azure-other-provider)
* [github.com/gptscript-ai/anthropic-provider](https://github.com/gptscript-ai/anthropic-provider)
* [github.com/gptscript-ai/claude3-anthropic-provider](https://github.com/gptscript-ai/claude3-anthropic-provider)
* [github.com/gptscript-ai/claude3-bedrock-provider](https://github.com/gptscript-ai/claude3-bedrock-provider)
* [github.com/gptscript-ai/gemini-aistudio-provider](https://github.com/gptscript-ai/gemini-aistudio-provider)
* [github.com/gptscript-ai/gemini-vertexai-provider](https://github.com/gptscript-ai/gemini-vertexai-provider)

Expand All @@ -43,13 +47,12 @@ For any provider that supports listing models, you can use this command:

```bash
# With a shim
gptscript --list-models github.com/gptscript-ai/anthropic-provider
gptscript --list-models github.com/gptscript-ai/claude3-anthropic-provider

# To OpenAI compatible endpoint
gptscript --list-models https://api.mistral.ai/v1
```


## Compatibility

While the shims provide support for using GPTScript with other models, the effectiveness of using a
Expand Down