Merge pull request #5494 from continuedev/nate/gpt-series-edit
mark all gpt- and o-series models as chat only (not /v1/completions)
This commit is contained in:
commit
a2ddc7fd41
2 changed files with 6 additions and 22 deletions
|
|
@ -31,26 +31,10 @@ const NON_CHAT_MODELS = [
|
|||
"ada",
|
||||
];
|
||||
|
||||
const CHAT_ONLY_MODELS = [
|
||||
"gpt-3.5-turbo",
|
||||
"gpt-3.5-turbo-0613",
|
||||
"gpt-3.5-turbo-16k",
|
||||
"gpt-4",
|
||||
"gpt-4-turbo",
|
||||
"gpt-4o",
|
||||
"gpt-35-turbo-16k",
|
||||
"gpt-35-turbo-0613",
|
||||
"gpt-35-turbo",
|
||||
"gpt-4-32k",
|
||||
"gpt-4-turbo-preview",
|
||||
"gpt-4-vision",
|
||||
"gpt-4-0125-preview",
|
||||
"gpt-4-1106-preview",
|
||||
"gpt-4o-mini",
|
||||
"o1-preview",
|
||||
"o1-mini",
|
||||
"o3-mini",
|
||||
];
|
||||
function isChatOnlyModel(model: string): boolean {
|
||||
// gpt and o-series models
|
||||
return model.startsWith("gpt") || model.startsWith("o");
|
||||
}
|
||||
|
||||
const formatMessageForO1 = (messages: ChatCompletionMessageParam[]) => {
|
||||
return messages?.map((message: any) => {
|
||||
|
|
@ -335,7 +319,7 @@ class OpenAI extends BaseLLM {
|
|||
options: CompletionOptions,
|
||||
): AsyncGenerator<ChatMessage> {
|
||||
if (
|
||||
!CHAT_ONLY_MODELS.includes(options.model) &&
|
||||
!isChatOnlyModel(options.model) &&
|
||||
this.supportsCompletions() &&
|
||||
(NON_CHAT_MODELS.includes(options.model) ||
|
||||
this.useLegacyCompletionsEndpoint ||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"name": "continue",
|
||||
"icon": "media/icon.png",
|
||||
"author": "Continue Dev, Inc",
|
||||
"version": "1.1.31",
|
||||
"version": "1.1.32",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/continuedev/continue"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue