Skip to content

Commit

Permalink
Stronger routing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
metaskills committed May 21, 2024
1 parent 59f33a8 commit dcf8945
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/fixtures/noLLMToolAssistant.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class NoLLMToolAssistant extends Assistant {
constructor() {
const name = helperName("NoLLMToolAssistant");
const description = "Answers to messages.";
const instructions = `You must route the message in full to your '${AnswerTool.toolName}' tool. Never respond without first using that tool. Never! Ex: When asked what color the sky is, use the '${AnswerTool.toolName}' tool first.`;
const instructions = `You must route /tool messages in full to your '${AnswerTool.toolName}' tool. Never respond without first using that tool. Never! Ex: When asked what color the sky is, use the '${AnswerTool.toolName}' tool first.`;
super(name, description, instructions);
this.addAssistantTool(AnswerTool);
}
Expand Down
5 changes: 4 additions & 1 deletion test/uat/noLLMTool.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { NoLLMToolAssistant } from "../fixtures.js";
test("using a tool wiht no llm", async () => {
const assistant = await NoLLMToolAssistant.create();
const threadID = await helperThreadID();
const output = await assistant.ask("What color is the sky today?", threadID);
const output = await assistant.ask(
"/tool What color is the sky today?",
threadID
);
expect(output).toMatch(/red/i);
expect(output).toMatch(/green/i);
});

0 comments on commit dcf8945

Please sign in to comment.