Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions java/src/main/java/com/genexus/GXProcedure.java
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,10 @@ protected String callAssistant(String agent, GXProperties properties, ArrayList<
}

protected ChatResult chatAgent(String agent, GXProperties properties, ArrayList<OpenAIResponse.Message> messages, CallResult result) {
return chatAgent(agent, properties, messages, null, result);
}

protected ChatResult chatAgent(String agent, GXProperties properties, ArrayList<OpenAIResponse.Message> messages, GXExternalCollection<?> history, CallResult result) {
ChatResult chatResult = new ChatResult();

new Thread(() -> {
Expand All @@ -283,6 +287,8 @@ protected ChatResult chatAgent(String agent, GXProperties properties, ArrayList<
callAgent(agent, true, properties, messages, result, chatResult);
} finally {
chatResult.markDone();
if (history != null)
history.setExternalInstance(messages);
}
}).start();

Expand Down
Loading