@@ -33,9 +33,9 @@ public Object get() {
3333 @ SuppressWarnings ("unchecked" )
3434 public <T > T visit (Visitor <T > visitor ) {
3535 if (this .type == 0 ) {
36- return visitor .visit ((AgentV1HistoryContent ) this .value );
36+ return visitor .visit ((ConversationHistoryMessage ) this .value );
3737 } else if (this .type == 1 ) {
38- return visitor .visit ((AgentV1HistoryFunctionCalls ) this .value );
38+ return visitor .visit ((FunctionCallHistoryMessage ) this .value );
3939 }
4040 throw new IllegalStateException ("Failed to visit value. This should never happen." );
4141 }
@@ -60,18 +60,18 @@ public String toString() {
6060 return this .value .toString ();
6161 }
6262
63- public static AgentV1History of (AgentV1HistoryContent value ) {
63+ public static AgentV1History of (ConversationHistoryMessage value ) {
6464 return new AgentV1History (value , 0 );
6565 }
6666
67- public static AgentV1History of (AgentV1HistoryFunctionCalls value ) {
67+ public static AgentV1History of (FunctionCallHistoryMessage value ) {
6868 return new AgentV1History (value , 1 );
6969 }
7070
7171 public interface Visitor <T > {
72- T visit (AgentV1HistoryContent value );
72+ T visit (ConversationHistoryMessage value );
7373
74- T visit (AgentV1HistoryFunctionCalls value );
74+ T visit (FunctionCallHistoryMessage value );
7575 }
7676
7777 static final class Deserializer extends StdDeserializer <AgentV1History > {
@@ -86,13 +86,13 @@ public AgentV1History deserialize(JsonParser p, DeserializationContext context)
8686 && ((Map <?, ?>) value ).containsKey ("role" )
8787 && ((Map <?, ?>) value ).containsKey ("content" )) {
8888 try {
89- return of (ObjectMappers .JSON_MAPPER .convertValue (value , AgentV1HistoryContent .class ));
89+ return of (ObjectMappers .JSON_MAPPER .convertValue (value , ConversationHistoryMessage .class ));
9090 } catch (RuntimeException e ) {
9191 }
9292 }
9393 if (value instanceof Map <?, ?> && ((Map <?, ?>) value ).containsKey ("function_calls" )) {
9494 try {
95- return of (ObjectMappers .JSON_MAPPER .convertValue (value , AgentV1HistoryFunctionCalls .class ));
95+ return of (ObjectMappers .JSON_MAPPER .convertValue (value , FunctionCallHistoryMessage .class ));
9696 } catch (RuntimeException e ) {
9797 }
9898 }
0 commit comments