mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-13 17:22:37 +02:00
agents.ts: fix mock tool creation
This commit is contained in:
parent
df2d004d7c
commit
c72728bf3d
1 changed files with 8 additions and 4 deletions
|
|
@ -351,10 +351,14 @@ function createMockTool(
|
|||
return tool({
|
||||
name: config.name,
|
||||
description: config.description,
|
||||
parameters: z.object({
|
||||
query: z.string().describe("The query to search for")
|
||||
}),
|
||||
async execute(input: { query: string }) {
|
||||
strict: false,
|
||||
parameters: {
|
||||
type: 'object',
|
||||
properties: config.parameters.properties,
|
||||
required: config.parameters.required || [],
|
||||
additionalProperties: true,
|
||||
},
|
||||
async execute(input: any) {
|
||||
try {
|
||||
const result = await invokeMockTool(
|
||||
logger,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue