Skip to content

Commit a187fcc

Browse files
committed
judge with original messages
1 parent 31a80d6 commit a187fcc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/sdk/server-ai/src/api/chat/TrackedChat.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,14 @@ export class TrackedChat {
4848
() => this.provider.invokeModel(allMessages),
4949
);
5050

51-
// Add the assistant response to the conversation history
52-
this.messages.push(response.message);
53-
54-
// Start judge evaluations if configured
5551
if (
5652
this.aiConfig.judgeConfiguration?.judges &&
5753
this.aiConfig.judgeConfiguration.judges.length > 0
5854
) {
5955
response.evaluations = this._evaluateWithJudges(this.messages, response);
6056
}
6157

58+
this.messages.push(response.message);
6259
return response;
6360
}
6461

0 commit comments

Comments
 (0)