Skip to content

Commit

Permalink
Update to use original event id
Browse files Browse the repository at this point in the history
  • Loading branch information
IanCal committed Jan 14, 2025
1 parent e4770c9 commit d2f38a2
Show file tree
Hide file tree
Showing 2 changed files with 394 additions and 182 deletions.
5 changes: 2 additions & 3 deletions packages/ai-bot/tests/prompt-construction-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1624,14 +1624,13 @@ test('Tools calls are connected to their results', () => {
);

const { messages } = getPromptParts(eventList, '@aibot:localhost');
console.log(messages);
// find the message with the tool call and its id
// it should have the result deserialised
const toolCallMessage = messages.find((message) => message.role === 'tool');
assert.ok(toolCallMessage, 'Should have a tool call message');
assert.ok(
toolCallMessage!.content!.includes('Sunny'),
'Tool call result should include "Sunny"',
toolCallMessage!.content!.includes('Cloudy'),
'Tool call result should include "Cloudy"',
);
});

Expand Down
Loading

0 comments on commit d2f38a2

Please sign in to comment.