All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.langchain4j.agentexecutor.AgentFinish Maven / Gradle / Ivy

package dev.langchain4j.agentexecutor;

import lombok.Value;
import lombok.experimental.Accessors;

import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.Map;
import java.util.Objects;

@Value
@Accessors( fluent = true)
public class AgentFinish {
    public static final Serializer SERIALIZER = new Serializer();

    Map returnValues;
    String log;

    public static class Serializer implements org.bsc.langgraph4j.serializer.Serializer {

        private Serializer() {
        }

        @Override
        public void write(AgentFinish object, ObjectOutput out) throws IOException {
            out.writeObject(object.returnValues);
            out.writeUTF(object.log);
        }

        @Override
        public AgentFinish read(ObjectInput in) throws IOException, ClassNotFoundException {
            return new AgentFinish((Map) in.readObject(), in.readUTF());
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy