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

xyz.felh.openai.assistant.run.RequiredAction Maven / Gradle / Ivy

There is a newer version: 4.0.2024102501
Show newest version
package xyz.felh.openai.assistant.run;

import com.alibaba.fastjson2.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Data;
import lombok.Getter;
import xyz.felh.openai.IOpenAiBean;
import xyz.felh.openai.chat.tool.ToolCall;

import java.util.List;

@Data
public class RequiredAction implements IOpenAiBean {

    /**
     * For now, this is always submit_tool_outputs.
     * See {@link Type}
     */
    @JSONField(name = "type")
    @JsonProperty("type")
    private Type type;

    /**
     * Details on the tool outputs needed for this run to continue.
     * 

* See {@link ToolOutput} */ @JSONField(name = "submit_tool_outputs") @JsonProperty("submit_tool_outputs") private ToolOutput submitToolOutputs; @Data public static class ToolOutput { /** * A list of the relevant tool calls. *

* See {@link ToolCall} */ @JSONField(name = "tool_calls") @JsonProperty("tool_calls") private List toolCalls; } @Getter public enum Type { SUBMIT_TOOL_OUTPUTS("submit_tool_outputs"); Type(final String value) { this.value = value; } private final String value; @JsonValue public String value() { return value; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy