Skip to content

Commit

Permalink
chore: update models
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjastrzebski committed May 13, 2024
1 parent 40d4b7b commit 5a4dc3b
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/engine/providers/mistral.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Mistral: Provider = {
apiKeyUrl: 'https://console.mistral.ai/api-keys/',

// OpenAI models: https://docs.mistral.ai/platform/endpoints/
defaultModel: 'mistral-medium-latest',
defaultModel: 'mistral-large-latest',

// Price per 1M tokens [input, output].
// Source: https://docs.mistral.ai/platform/pricing/
Expand Down
5 changes: 3 additions & 2 deletions src/engine/providers/open-ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ const OpenAi: Provider = {
name: 'openAi',
apiKeyUrl: 'https://platform.openai.com/api-keys',

// OpenAI models: https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo
defaultModel: 'gpt-4-turbo',
// OpenAI models: https://platform.openai.com/docs/models
defaultModel: 'gpt-4o',

// Price per 1M tokens [input, output].
// Source: https://openai.com/pricing
modelPricing: {
'gpt-4o': { inputTokensCost: 5, outputTokensCost: 15 },
'gpt-4-turbo': { inputTokensCost: 10, outputTokensCost: 30 },
'gpt-4-turbo-2024-04-09': { inputTokensCost: 10, outputTokensCost: 30 },
'gpt-4': { inputTokensCost: 30, outputTokensCost: 60 },
Expand Down
6 changes: 3 additions & 3 deletions src/engine/providers/perplexity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ const Perplexity: Provider = {
outputTokensCost: 0.2,
requestsCost: 5,
},
'llama-3-sonar-large-32k-chat': { inputTokensCost: 0.6, outputTokensCost: 0.6 },
'llama-3-sonar-large-32k-chat': { inputTokensCost: 1, outputTokensCost: 1 },
'llama-3-sonar-large-32k-online': {
inputTokensCost: 0.6,
outputTokensCost: 0.6,
inputTokensCost: 1,
outputTokensCost: 1,
requestsCost: 5,
},
'llama-3-8b-instruct': { inputTokensCost: 0.2, outputTokensCost: 0.2 },
Expand Down
19 changes: 15 additions & 4 deletions website/docs/config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,47 +81,58 @@ Each of supported providers can be tuned with `model` option to select an exact
"providers": {
"openAi": {
// ...
"model": "gpt-4-turbo-preview"
"model": "gpt-4o" // Current default model
}
}
}
```

List of [supported Open AI models](https://platform.openai.com/docs/models).
</TabItem>
<TabItem value="anthropic" label="Anthropic">

```json
{
"providers": {
"anthropic": {
// ...
"model": "claude-3-sonnet-20240229"
"model": "claude-3-sonnet-20240229" // Current default model
}
}
}
```

List of [supported Anthropic models](https://docs.anthropic.com/en/docs/models-overview).
</TabItem>
<TabItem value="perplexity" label="Perplexity">

```json
{
"providers": {
"perplexity": {
// ...
"model": "sonar-medium-chat"
"model": "llama-3-sonar-large-32k-chat" // Current default model
}
}
}
```

List of [supported Perplexity models](https://docs.perplexity.ai/docs/model-cards).
</TabItem>
<TabItem value="mistral" label="Mistral">

```json
{
"providers": {
"mistral": {
// ...
"model": "open-mixtral-8x7b"
"model": "mistral-large-latest" // Current default model
}
}
}
```

List of [supported Mistral models](https://docs.mistral.ai/getting-started/models/).
</TabItem>
</Tabs>

Expand Down
12 changes: 10 additions & 2 deletions website/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,15 @@ CLI options are passed when invoking the `ai` commend:

You should have a relevant API key in your `~/.airc.json` file.

### Defaults models

- OpenAI: `gpt-4o` (input: $5, output: $15\*)
- Anthropic: `claude-3-sonnet-20240229` (input: $3, output: $15\*)
- Perplexity: `llama-3-sonar-large-32k-chat` (input: $1, output: $1\*)
- Mistral: `'mistral-large-latest` (input: $4, output: $12\*)

\* prices per 1 million tokens

### Model Aliases

Using full model names can be tedious, so AI CLI supports shorthand model aliases:
Expand All @@ -76,8 +85,7 @@ Using full model names can be tedious, so AI CLI supports shorthand model aliase
<TabItem value="openAi" label="Open AI">
| Alias | Model |
| --------------- | --------------------- |
| `gpt-4-turbo` | `gpt-4-turbo-preview` |
| `gpt-3.5-turbo` | `gpt-3.5-turbo` |
| `gpt-3.5` | `gpt-3.5-turbo` |
</TabItem>
<TabItem value="anthropic" label="Anthropic">
| Alias | Model |
Expand Down

0 comments on commit 5a4dc3b

Please sign in to comment.