🚀 feat: o1 (#4019)

* feat: o1 default response sender string

* feat: add o1 models to default openai models list, add `no_system_messages` error type; refactor: use error type as localization key

* refactor(MessageEndpointIcon): differentiate openAI icon model color for o1 models

* refactor(AnthropicClient): use new input/output tokens keys; add prompt caching for claude-3-opus

* refactor(BaseClient): to use new input/output tokens keys; update typedefs

* feat: initial o1 model handling, including token cost complexity

* EXPERIMENTAL: special handling for o1 model with custom instructions
This commit is contained in:
Danny Avila 2024-09-12 18:15:43 -04:00 committed by GitHub
parent 9a393be012
commit 45b42830a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 229 additions and 36 deletions

View file

@ -240,6 +240,8 @@ export const getResponseSender = (endpointOption: t.TEndpointOption): string =>
) {
if (chatGptLabel) {
return chatGptLabel;
} else if (model && /\bo1\b/i.test(model)) {
return 'o1';
} else if (model && model.includes('gpt-3')) {
return 'GPT-3.5';
} else if (model && model.includes('gpt-4o')) {