chore: Update version to 1.6.8 and enhance conversation handling in BaseAgent
This commit is contained in:
4
pom.xml
4
pom.xml
@@ -4,13 +4,13 @@
|
||||
<artifactId>lm-lib</artifactId>
|
||||
<groupId>de.extio</groupId>
|
||||
<name>lm-lib</name>
|
||||
<version>1.6.7</version>
|
||||
<version>1.6.8</version>
|
||||
|
||||
<properties>
|
||||
<java.version>21</java.version>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<spring-boot.version>3.5.3</spring-boot.version>
|
||||
<spring-boot.version>3.5.5</spring-boot.version>
|
||||
<azureai.version>1.0.0-beta.5</azureai.version>
|
||||
<jtokkit.version>1.1.0</jtokkit.version>
|
||||
<commons-lang3.version>3.12.0</commons-lang3.version>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package de.extio.lmlib.agent;
|
||||
|
||||
public enum AgentType {
|
||||
COMPLETION, START_CONVERSATION, CONVERSATION, CONVERSATION_WITH_SYSTEM_PROMPT, PROCESSING_ONLY;
|
||||
COMPLETION, START_CONVERSATION, START_CONVERSATION_WITH_SYSTEM_PROMPT, CONVERSATION, CONVERSATION_WITH_SYSTEM_PROMPT, PROCESSING_ONLY;
|
||||
}
|
||||
|
||||
@@ -272,6 +272,10 @@ public interface BaseAgent {
|
||||
}
|
||||
split.context().setConversation(conversation);
|
||||
}
|
||||
else if (this.agentType(split.context()) == AgentType.START_CONVERSATION_WITH_SYSTEM_PROMPT) {
|
||||
conversation = Conversation.create(this.systemPrompt(), split.text());
|
||||
split.context().setConversation(conversation);
|
||||
}
|
||||
else {
|
||||
if (conversation.getConversation().get(0).type() == TurnType.SYSTEM && this.agentType(split.context()) != AgentType.CONVERSATION_WITH_SYSTEM_PROMPT) {
|
||||
final String mergedSysAndUser;
|
||||
@@ -332,7 +336,7 @@ public interface BaseAgent {
|
||||
context.setConversation(null);
|
||||
}
|
||||
|
||||
case final BaseAgent a when a.agentType(context) == AgentType.START_CONVERSATION -> {
|
||||
case final BaseAgent a when a.agentType(context) == AgentType.START_CONVERSATION || a.agentType(context) == AgentType.START_CONVERSATION_WITH_SYSTEM_PROMPT -> {
|
||||
context.getGraph().add("🗨");
|
||||
context.setConversation(null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user