feat(OpenAI Node): Include O1 models in the models select (#10801)
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions

This commit is contained in:
oleg 2024-09-12 21:09:59 +02:00 committed by GitHub
parent 53c0fb18bf
commit b2b1abc531
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

@ -95,6 +95,7 @@ export class LmChatOpenAi implements INodeType {
pass: `={{ pass: `={{
($parameter.options?.baseURL && !$parameter.options?.baseURL?.includes('api.openai.com')) || ($parameter.options?.baseURL && !$parameter.options?.baseURL?.includes('api.openai.com')) ||
$responseItem.id.startsWith('ft:') || $responseItem.id.startsWith('ft:') ||
$responseItem.id.startsWith('o1') ||
($responseItem.id.startsWith('gpt-') && !$responseItem.id.includes('instruct')) ($responseItem.id.startsWith('gpt-') && !$responseItem.id.includes('instruct'))
}}`, }}`,
}, },

View file

@ -76,10 +76,10 @@ export async function modelSearch(
this: ILoadOptionsFunctions, this: ILoadOptionsFunctions,
filter?: string, filter?: string,
): Promise<INodeListSearchResult> { ): Promise<INodeListSearchResult> {
return await getModelSearch((model) => model.id.startsWith('gpt-') || model.id.startsWith('ft:'))( return await getModelSearch(
this, (model) =>
filter, model.id.startsWith('gpt-') || model.id.startsWith('ft:') || model.id.startsWith('o1'),
); )(this, filter);
} }
export async function imageModelSearch( export async function imageModelSearch(