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({
|
return tool({
|
||||||
name: config.name,
|
name: config.name,
|
||||||
description: config.description,
|
description: config.description,
|
||||||
parameters: z.object({
|
strict: false,
|
||||||
query: z.string().describe("The query to search for")
|
parameters: {
|
||||||
}),
|
type: 'object',
|
||||||
async execute(input: { query: string }) {
|
properties: config.parameters.properties,
|
||||||
|
required: config.parameters.required || [],
|
||||||
|
additionalProperties: true,
|
||||||
|
},
|
||||||
|
async execute(input: any) {
|
||||||
try {
|
try {
|
||||||
const result = await invokeMockTool(
|
const result = await invokeMockTool(
|
||||||
logger,
|
logger,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue