Skip to content
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

Generic Multimodal Support #1021

Merged
merged 15 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from 8 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
33 changes: 27 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ The following is the default `chatPromptTemplate`, although newlines and indenti

#### Multi modal model

We currently only support IDEFICS as a multimodal model, hosted on TGI. You can enable it by using the following config (if you have a PRO HF Api token):
We currently support IDEFICS, hosted on TGI, OpenAI and Claude 3 as multimodal models. You can enable it by setting `multimodal: true` in your `MODELS` configuration. For IDEFICS, you must have a PRO HF Api token. For OpenAI, see the [OpenAI section](#OpenAI). For Anthropic, see the [Anthropic section](#Anthropic).
Saghen marked this conversation as resolved.
Show resolved Hide resolved

```env
{
Expand Down Expand Up @@ -463,14 +463,34 @@ MODELS=`[

#### Anthropic

We also support Anthropic models through the official SDK. You may provide your API key via the `ANTHROPIC_API_KEY` env variable, or alternatively, through the `endpoints.apiKey` as per the following example.
We also support multimodal Anthropic models through the official SDK. You may provide your API key via the `ANTHROPIC_API_KEY` env variable, or alternatively, through the `endpoints.apiKey` as per the following example.
Saghen marked this conversation as resolved.
Show resolved Hide resolved

```
MODELS=`[
{
"name": "claude-3-haiku-20240307",
"displayName": "Claude 3 Haiku",
"description": "Fastest and most compact model for near-instant responsiveness",
"multimodal": true,
Saghen marked this conversation as resolved.
Show resolved Hide resolved
"parameters": {
"max_new_tokens": 4096,
},
"endpoints": [
{
"type": "anthropic",
// optionals
"apiKey": "sk-ant-...",
"baseURL": "https://api.anthropic.com",
"defaultHeaders": {},
"defaultQuery": {}
}
]
},
{
"name": "claude-3-sonnet-20240229",
"displayName": "Claude 3 Sonnet",
"description": "Ideal balance of intelligence and speed",
"multimodal": true,
"parameters": {
"max_new_tokens": 4096,
},
Expand All @@ -480,15 +500,16 @@ MODELS=`[
// optionals
"apiKey": "sk-ant-...",
"baseURL": "https://api.anthropic.com",
defaultHeaders: {},
defaultQuery: {}
"defaultHeaders": {},
"defaultQuery": {}
}
]
},
{
"name": "claude-3-opus-20240229",
"displayName": "Claude 3 Opus",
"description": "Most powerful model for highly complex tasks",
"multimodal": true,
"parameters": {
"max_new_tokens": 4096
},
Expand All @@ -498,8 +519,8 @@ MODELS=`[
// optionals
"apiKey": "sk-ant-...",
"baseURL": "https://api.anthropic.com",
defaultHeaders: {},
defaultQuery: {}
"defaultHeaders": {},
"defaultQuery": {}
}
]
}
Expand Down
Loading