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

io.github.sashirestela.openai.domain.assistant.AssistantRequest Maven / Gradle / Ivy

There is a newer version: 3.9.2
Show newest version
package io.github.sashirestela.openai.domain.assistant;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import io.github.sashirestela.openai.common.ResponseFormat;
import io.github.sashirestela.openai.common.tool.Tool;
import io.github.sashirestela.slimvalidator.constraints.ObjectType;
import io.github.sashirestela.slimvalidator.constraints.Range;
import io.github.sashirestela.slimvalidator.constraints.Required;
import io.github.sashirestela.slimvalidator.constraints.Size;
import lombok.Builder;
import lombok.Getter;
import lombok.Singular;

import java.util.List;
import java.util.Map;

@Getter
@Builder
@JsonInclude(Include.NON_EMPTY)
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class AssistantRequest {

    @Required
    private String model;

    @Size(max = 256)
    private String name;

    @Size(max = 512)
    private String description;

    @Size(max = 256_000)
    private String instructions;

    @Singular
    @Size(max = 128)
    private List tools;

    private ToolResourceFull toolResources;

    @Size(max = 16)
    private Map metadata;

    @Range(min = 0.0, max = 2.0)
    private Double temperature;

    @Range(min = 0.0, max = 1.0)
    private Double topP;

    @ObjectType(baseClass = String.class)
    @ObjectType(baseClass = ResponseFormat.class)
    private Object responseFormat;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy