Skip to content

Commit

Permalink
Fix tool selector call
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardobl committed May 20, 2024
1 parent 1c685bb commit 019053a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/rag/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,15 @@ async function run() {
let toolReq;
if (!warmUp && useTools){
Job.log("Send tool request...");
const toolsInputs = [];
for(const query of queries){
toolsInputs.push(await Job.newInputData(query, "text", "query"));
}

toolReq = Job.subrequest({
runOn: "openagents/tools",
runOn: "openagents/tool-selector",
outputFormat: "application/json",
inputs: [
await Job.newInputData(queries, "text", "queries")
],
inputs: toolsInputs,
params: [
...cacheParams
]
Expand Down

0 comments on commit 019053a

Please sign in to comment.