mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
Feat/update ollama for function calling (#2892)
update ollama for function calling
This commit is contained in:
@@ -174,7 +174,7 @@ class ChatflowTool extends StructuredTool {
|
||||
|
||||
schema = z.object({
|
||||
input: z.string().describe('input question')
|
||||
})
|
||||
}) as any
|
||||
|
||||
constructor({
|
||||
name,
|
||||
|
||||
@@ -42,6 +42,7 @@ export class DynamicStructuredTool<
|
||||
|
||||
func: DynamicStructuredToolInput['func']
|
||||
|
||||
// @ts-ignore
|
||||
schema: T
|
||||
private variables: any[]
|
||||
private flowObj: any
|
||||
|
||||
@@ -63,7 +63,7 @@ export class ReadFileTool extends StructuredTool {
|
||||
|
||||
schema = z.object({
|
||||
file_path: z.string().describe('name of file')
|
||||
})
|
||||
}) as any
|
||||
|
||||
name = 'read_file'
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ class Retriever_Tools implements INode {
|
||||
|
||||
const schema = z.object({
|
||||
input: z.string().describe('input to look up in retriever')
|
||||
})
|
||||
}) as any
|
||||
|
||||
const tool = new DynamicStructuredTool({ ...input, func, schema })
|
||||
return tool
|
||||
|
||||
@@ -64,7 +64,7 @@ export class WriteFileTool extends StructuredTool {
|
||||
schema = z.object({
|
||||
file_path: z.string().describe('name of file'),
|
||||
text: z.string().describe('text to write to file')
|
||||
})
|
||||
}) as any
|
||||
|
||||
name = 'write_file'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user