Skip to content

Commit

Permalink
fix(OpenAI Chat Model Node): Prevent filtering of fine-tuned models i…
Browse files Browse the repository at this point in the history
…n model selector (#10662)
  • Loading branch information
OlegIvaniv authored and riascho committed Sep 23, 2024
1 parent 70082c4 commit ccc0c38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
pass: `={{
($parameter.options?.baseURL && !$parameter.options?.baseURL?.includes('api.openai.com')) ||
$responseItem.id.startsWith('ft:') ||
($responseItem.id.startsWith('gpt-') && !$responseItem.id.includes('instruct'))
}}`,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ export async function modelSearch(
this: ILoadOptionsFunctions,
filter?: string,
): 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(
Expand Down

0 comments on commit ccc0c38

Please sign in to comment.