added memory_id
This commit is contained in:
@@ -21,6 +21,7 @@ public class AdvancedAIPromptSolver extends StepSolver {
|
|||||||
private String qai_output_variable;
|
private String qai_output_variable;
|
||||||
private boolean qai_load_graph_schema=false;
|
private boolean qai_load_graph_schema=false;
|
||||||
private String qai_output_entityType;
|
private String qai_output_entityType;
|
||||||
|
private String qai_custom_memory_id;
|
||||||
|
|
||||||
|
|
||||||
Logger logger = (Logger) LoggerFactory.getLogger(BasicQueryRagSolver.class);
|
Logger logger = (Logger) LoggerFactory.getLogger(BasicQueryRagSolver.class);
|
||||||
@@ -46,6 +47,7 @@ public class AdvancedAIPromptSolver extends StepSolver {
|
|||||||
this.qai_output_variable = (String) this.step.getAttributes().get("qai_output_variable");
|
this.qai_output_variable = (String) this.step.getAttributes().get("qai_output_variable");
|
||||||
this.qai_output_entityType = (String) this.step.getAttributes().get("qai_output_entityType");
|
this.qai_output_entityType = (String) this.step.getAttributes().get("qai_output_entityType");
|
||||||
|
|
||||||
|
this.qai_custom_memory_id = (String) this.step.getAttributes().get("qai_custom_memory_id");
|
||||||
//TODO: Add memory ID attribute to have the possibility of multiple conversations
|
//TODO: Add memory ID attribute to have the possibility of multiple conversations
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -66,7 +68,8 @@ public class AdvancedAIPromptSolver extends StepSolver {
|
|||||||
|
|
||||||
CallResponseSpec resp = chatClient.prompt()
|
CallResponseSpec resp = chatClient.prompt()
|
||||||
.messages(userMessage,systemMessage)
|
.messages(userMessage,systemMessage)
|
||||||
.advisors(advisor -> advisor.param("chat_memory_conversation_id", this.scenarioExecution.getId())
|
.advisors(advisor -> advisor
|
||||||
|
.param("chat_memory_conversation_id", this.scenarioExecution.getId()+this.qai_custom_memory_id)
|
||||||
.param("chat_memory_response_size", 100))
|
.param("chat_memory_response_size", 100))
|
||||||
.call();
|
.call();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user