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>
|
<artifactId>lm-lib</artifactId>
|
||||||
<groupId>de.extio</groupId>
|
<groupId>de.extio</groupId>
|
||||||
<name>lm-lib</name>
|
<name>lm-lib</name>
|
||||||
<version>1.6.22</version>
|
<version>1.6.23</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>21</java.version>
|
<java.version>21</java.version>
|
||||||
|
|||||||
@@ -351,11 +351,17 @@ public interface BaseAgent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case final BaseAgent a when a.agentType(context) == AgentType.CONVERSATION || a.agentType(context) == AgentType.CONVERSATION_WITH_SYSTEM_PROMPT -> {
|
case final BaseAgent a when a.agentType(context) == AgentType.CONVERSATION || a.agentType(context) == AgentType.CONVERSATION_WITH_SYSTEM_PROMPT -> {
|
||||||
|
if (context.getConversation() == null) {
|
||||||
|
context.getGraph().add("🗨");
|
||||||
|
context.setConversation(null);
|
||||||
|
}
|
||||||
|
else {
|
||||||
context.getGraph().add("↴");
|
context.getGraph().add("↴");
|
||||||
if (context.getConversation().getConversation().getLast().type() != TurnType.ASSISTANT) {
|
if (context.getConversation().getConversation().getLast().type() != TurnType.ASSISTANT) {
|
||||||
context.getConversation().addTurn(new Conversation.Turn(TurnType.ASSISTANT, context.getLastCompletion().response()));
|
context.getConversation().addTurn(new Conversation.Turn(TurnType.ASSISTANT, context.getLastCompletion().response()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
case final BaseAgent a when a.agentType(context) == AgentType.PROCESSING_ONLY -> {
|
case final BaseAgent a when a.agentType(context) == AgentType.PROCESSING_ONLY -> {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user