mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
Chore/Google GenAI (#4742)
* update @langchain/core, custom google genai implementation * update @langchain/core, custom google genai implementation
This commit is contained in:
@@ -308,7 +308,7 @@ const _generateSelectedTools = async (config: Record<string, any>, question: str
|
||||
const model = (await newToolNodeInstance.init(config.selectedChatModel, '', options)) as BaseChatModel
|
||||
|
||||
// Create a parser to validate the output
|
||||
const parser = StructuredOutputParser.fromZodSchema(ToolType)
|
||||
const parser = StructuredOutputParser.fromZodSchema(ToolType as any)
|
||||
|
||||
// Generate JSON schema from our Zod schema
|
||||
const formatInstructions = parser.getFormatInstructions()
|
||||
@@ -364,7 +364,7 @@ const generateNodesEdges = async (config: Record<string, any>, question: string,
|
||||
const model = (await newToolNodeInstance.init(config.selectedChatModel, '', options)) as BaseChatModel
|
||||
|
||||
// Create a parser to validate the output
|
||||
const parser = StructuredOutputParser.fromZodSchema(NodesEdgesType)
|
||||
const parser = StructuredOutputParser.fromZodSchema(NodesEdgesType as any)
|
||||
|
||||
// Generate JSON schema from our Zod schema
|
||||
const formatInstructions = parser.getFormatInstructions()
|
||||
|
||||
@@ -56,7 +56,7 @@ export const generateFollowUpPrompts = async (
|
||||
temperature: parseFloat(`${providerConfig.temperature}`)
|
||||
})
|
||||
// use structured output parser because withStructuredOutput is not working
|
||||
const parser = StructuredOutputParser.fromZodSchema(FollowUpPromptType)
|
||||
const parser = StructuredOutputParser.fromZodSchema(FollowUpPromptType as any)
|
||||
const formatInstructions = parser.getFormatInstructions()
|
||||
const prompt = PromptTemplate.fromTemplate(`
|
||||
${providerConfig.prompt}
|
||||
|
||||
Reference in New Issue
Block a user