Skip to content

Commit

Permalink
Add chat messages to orchestrator logging
Browse files Browse the repository at this point in the history
  • Loading branch information
planger committed Nov 1, 2024
1 parent 3d7d393 commit e529844
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/ai-chat/src/common/orchestrator-chat-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ export class OrchestratorChatAgent extends AbstractStreamParsingChatAgent implem
// We generate a dedicated ID for recording the orchestrator request/response, as we will forward the original request to another agent
const orchestratorRequestId = generateUuid();
request.addData(OrchestratorRequestIdKey, orchestratorRequestId);
const messages = await this.getMessages(request.session);
const systemMessage = (await this.getSystemMessageDescription())?.text;
this.recordingService.recordRequest(
ChatHistoryEntry.fromRequest(this.id, request, {
requestId: orchestratorRequestId,
messages,
systemMessage
})
);
Expand Down

0 comments on commit e529844

Please sign in to comment.