fix: Update version to 1.6.23 in pom.xml and add null check for conversation in BaseAgent
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
||||
<artifactId>lm-lib</artifactId>
|
||||
<groupId>de.extio</groupId>
|
||||
<name>lm-lib</name>
|
||||
<version>1.6.22</version>
|
||||
<version>1.6.23</version>
|
||||
|
||||
<properties>
|
||||
<java.version>21</java.version>
|
||||
|
||||
@@ -351,9 +351,15 @@ public interface BaseAgent {
|
||||
}
|
||||
|
||||
case final BaseAgent a when a.agentType(context) == AgentType.CONVERSATION || a.agentType(context) == AgentType.CONVERSATION_WITH_SYSTEM_PROMPT -> {
|
||||
context.getGraph().add("↴");
|
||||
if (context.getConversation().getConversation().getLast().type() != TurnType.ASSISTANT) {
|
||||
context.getConversation().addTurn(new Conversation.Turn(TurnType.ASSISTANT, context.getLastCompletion().response()));
|
||||
if (context.getConversation() == null) {
|
||||
context.getGraph().add("🗨");
|
||||
context.setConversation(null);
|
||||
}
|
||||
else {
|
||||
context.getGraph().add("↴");
|
||||
if (context.getConversation().getConversation().getLast().type() != TurnType.ASSISTANT) {
|
||||
context.getConversation().addTurn(new Conversation.Turn(TurnType.ASSISTANT, context.getLastCompletion().response()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user