Skip to content

Commit

Permalink
try o3-mini
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushAgrawal-A2 committed Jan 31, 2025
1 parent 1148899 commit 93da7ec
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 12 deletions.
16 changes: 11 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion quadratic-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"multer": "^1.4.5-lts.1",
"multer-s3": "^3.0.1",
"newrelic": "^11.17.0",
"openai": "^4.77.3",
"openai": "^4.82.0",
"pg": "^8.11.3",
"stripe": "^14.16.0",
"supertest": "^6.3.3",
Expand Down
19 changes: 14 additions & 5 deletions quadratic-shared/ai/models/AI_MODELS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,22 @@ export const MODEL_OPTIONS: {
enabled: true,
provider: 'openai',
},
'o1-preview': {
displayName: 'OpenAI: o1-preview',
temperature: 1, // only temperature 1 is supported for o1-preview
'o1-2024-12-17': {
displayName: 'OpenAI: o1',
temperature: 1, // only temperature 1 is supported for o1
max_tokens: 4096, // not used for openai
canStream: false, // stream is not supported for o1-preview
canStream: false, // stream is not supported for o1
canStreamWithToolCalls: false,
enabled: true,
provider: 'openai',
},
'o3-mini-2025-01-31': {
displayName: 'OpenAI: o3-mini',
temperature: 1,
max_tokens: 4096,
canStream: true,
canStreamWithToolCalls: true,
enabled: false,
enabled: true,
provider: 'openai',
},
'claude-3-5-sonnet-20241022': {
Expand Down
4 changes: 3 additions & 1 deletion quadratic-shared/typesAndSchemasAI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export type BedrockAnthropicModel = z.infer<typeof BedrockAnthropicModelSchema>;
const AnthropicModelSchema = z.enum(['claude-3-5-sonnet-20241022']).default('claude-3-5-sonnet-20241022');
export type AnthropicModel = z.infer<typeof AnthropicModelSchema>;

const OpenAIModelSchema = z.enum(['gpt-4o-2024-11-20', 'o1-preview']).default('gpt-4o-2024-11-20');
const OpenAIModelSchema = z
.enum(['gpt-4o-2024-11-20', 'o1-2024-12-17', 'o3-mini-2025-01-31'])
.default('gpt-4o-2024-11-20');
export type OpenAIModel = z.infer<typeof OpenAIModelSchema>;

const AIModelSchema = z.union([BedrockModelSchema, AnthropicModelSchema, OpenAIModelSchema]);
Expand Down

0 comments on commit 93da7ec

Please sign in to comment.