Skip to content

Commit

Permalink
fix dup last trace (opensearch-project#1973)
Browse files Browse the repository at this point in the history
Signed-off-by: Jing Zhang <[email protected]>
  • Loading branch information
jngz-es authored and austintlee committed Mar 18, 2024
1 parent 817d6a8 commit c87fc8a
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,21 +374,6 @@ private void runReAct(
.build();
conversationIndexMemory.save(msgTemp, parentInteractionId, traceNumber.addAndGet(1), null);
}
if (finalAnswer != null) {
finalAnswer = finalAnswer.trim();
if (conversationIndexMemory != null) {
// Create final trace message.
ConversationIndexMessage msgTemp = ConversationIndexMessage
.conversationIndexMessageBuilder()
.type("ReAct")
.question(question)
.response(finalAnswer)
.finalAnswer(true)
.sessionId(sessionId)
.build();
conversationIndexMemory.save(msgTemp, parentInteractionId, traceNumber.addAndGet(1), null);
}
}
if (finalAnswer != null) {
finalAnswer = finalAnswer.trim();
if (conversationIndexMemory != null) {
Expand Down

0 comments on commit c87fc8a

Please sign in to comment.