mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
fix(OpenAI Chat Model Node): Prevent filtering of fine-tuned models in model selector (#10662)
This commit is contained in:
parent
e9b8d99084
commit
4e89912588
|
@ -94,6 +94,7 @@ export class LmChatOpenAi implements INodeType {
|
||||||
// If the baseURL is not set or is set to api.openai.com, include only chat models
|
// If the baseURL is not set or is set to api.openai.com, include only chat models
|
||||||
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('gpt-') && !$responseItem.id.includes('instruct'))
|
($responseItem.id.startsWith('gpt-') && !$responseItem.id.includes('instruct'))
|
||||||
}}`,
|
}}`,
|
||||||
},
|
},
|
||||||
|
|
|
@ -76,7 +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-'))(this, filter);
|
return await getModelSearch((model) => model.id.startsWith('gpt-') || model.id.startsWith('ft:'))(
|
||||||
|
this,
|
||||||
|
filter,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function imageModelSearch(
|
export async function imageModelSearch(
|
||||||
|
|
Loading…
Reference in a new issue