Skip to content

Commit

Permalink
feat(OpenAI Node): Include O1 models in the models select (#10801)
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegIvaniv authored and riascho committed Sep 23, 2024
1 parent a8fa7d8 commit a13f69f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export class LmChatOpenAi implements INodeType {
pass: `={{
($parameter.options?.baseURL && !$parameter.options?.baseURL?.includes('api.openai.com')) ||
$responseItem.id.startsWith('ft:') ||
$responseItem.id.startsWith('o1') ||
($responseItem.id.startsWith('gpt-') && !$responseItem.id.includes('instruct'))
}}`,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ export async function modelSearch(
this: ILoadOptionsFunctions,
filter?: string,
): Promise<INodeListSearchResult> {
return await getModelSearch((model) => model.id.startsWith('gpt-') || model.id.startsWith('ft:'))(
this,
filter,
);
return await getModelSearch(
(model) =>
model.id.startsWith('gpt-') || model.id.startsWith('ft:') || model.id.startsWith('o1'),
)(this, filter);
}

export async function imageModelSearch(
Expand Down

0 comments on commit a13f69f

Please sign in to comment.