Skip to content

Commit 4350887

Browse files
cr
1 parent c064b83 commit 4350887

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/src/createAgent/dynamicTools/advanced.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const selectToolsMiddleware = createMiddleware({
7373
? // only give me the most relevant tool
7474
await selectTopKBySimilarity(last.content as string, 1)
7575
: fullCatalog.slice(0, 5);
76-
return { ...request, tools: active };
76+
return { ...request, tools: active.map((t) => t.name) };
7777
},
7878
});
7979

examples/src/createAgent/dynamicTools/simple.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const vcsToolGate = createMiddleware({
3737
const provider = runtime.context.vcsProvider.toLowerCase();
3838
const active =
3939
provider === "gitlab" ? [gitlabCreateIssue] : [githubCreateIssue];
40-
return { ...request, tools: active };
40+
return { ...request, tools: active.map((t) => t.name) };
4141
},
4242
});
4343

0 commit comments

Comments
 (0)