Skip to content

Commit

Permalink
feat: add support for new GPT-4o model
Browse files Browse the repository at this point in the history
  • Loading branch information
Patai5 committed May 20, 2024
1 parent 1665f52 commit 392828f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
13 changes: 11 additions & 2 deletions actors/extended-gpt-scraper/.actor/input_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,23 @@
"editor": "select",
"default": "gpt-3.5-turbo",
"prefill": "gpt-3.5-turbo",
"enum": ["gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-4", "gpt-4-32k", "text-davinci-003", "gpt-4-turbo"],
"enum": [
"gpt-3.5-turbo",
"gpt-3.5-turbo-16k",
"gpt-4",
"gpt-4-32k",
"text-davinci-003",
"gpt-4-turbo",
"gpt-4o"
],
"enumTitles": [
"GPT-3.5 Turbo",
"GPT-3.5 Turbo 16k",
"GPT-4",
"GPT-4 32k",
"GTP-3 (davinci)",
"GPT-4 Turbo (Preview)"
"GPT-4 Turbo (Preview)",
"GPT-4o"
]
},
"includeUrlGlobs": {
Expand Down
9 changes: 9 additions & 0 deletions code/src/models/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,13 @@ const OPEN_AI_MODELS: { [modelKey: string]: ModelConfig } = {
output: 0.03,
},
},
'gpt-4o': {
modelName: 'gpt-4o',
maxTokens: 128_000,
interface: 'chat',
cost: {
input: 0.005,
output: 0.015,
},
},
} as const;
6 changes: 4 additions & 2 deletions code/src/types/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ export interface Usage {
}

export interface Cost {
input: number; // USD cost per 1000 tokens
output: number; // USD cost per 1000 tokens
/** USD cost per 1000 tokens */
input: number;
/** USD cost per 1000 tokens */
output: number;
}

export interface ProcessInstructionsOptions<ModelSettings extends object> {
Expand Down

0 comments on commit 392828f

Please sign in to comment.