mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
Bugfix/Follow up prompt for openai (#4987)
fix follow up prompt for openai
This commit is contained in:
@@ -95,8 +95,10 @@ export const generateFollowUpPrompts = async (
|
|||||||
const model = new ChatOpenAI({
|
const model = new ChatOpenAI({
|
||||||
apiKey: credentialData.openAIApiKey,
|
apiKey: credentialData.openAIApiKey,
|
||||||
model: providerConfig.modelName,
|
model: providerConfig.modelName,
|
||||||
temperature: parseFloat(`${providerConfig.temperature}`)
|
temperature: parseFloat(`${providerConfig.temperature}`),
|
||||||
|
useResponsesApi: true
|
||||||
})
|
})
|
||||||
|
// @ts-ignore
|
||||||
const structuredLLM = model.withStructuredOutput(FollowUpPromptType)
|
const structuredLLM = model.withStructuredOutput(FollowUpPromptType)
|
||||||
const structuredResponse = await structuredLLM.invoke(followUpPromptsPrompt)
|
const structuredResponse = await structuredLLM.invoke(followUpPromptsPrompt)
|
||||||
return structuredResponse
|
return structuredResponse
|
||||||
|
|||||||
Reference in New Issue
Block a user