Class ResponseFormat

java.lang.Object
nl.dannyj.mistral.models.completion.ResponseFormat

public class ResponseFormat extends Object
The response format of a completion request.
  • Constructor Details

    • ResponseFormat

      public ResponseFormat(ResponseFormats type)
      Constructor for creating a ResponseFormat object with a specified type.
      Parameters:
      type - The type of the response format.
    • ResponseFormat

      public ResponseFormat(ResponseFormats type, @Nullable JsonSchema jsonSchema)
      Creates a new ResponseFormat instance.
      Parameters:
      type - The type of the response format.
      jsonSchema - The JSON schema definition.
    • ResponseFormat

      public ResponseFormat()
  • Method Details

    • getType

      public ResponseFormats getType()
      The type of the response format. Currently, can either be TEXT or JSON.
      Returns:
      The type of the response format.
    • getJsonSchema

      @Nullable public JsonSchema getJsonSchema()
      The JSON schema definition to use when type is JSON_SCHEMA.
      Returns:
      The JSON schema definition.
    • setType

      public void setType(ResponseFormats type)
      The type of the response format. Currently, can either be TEXT or JSON.
      Parameters:
      type - The type of the response format.
    • setJsonSchema

      public void setJsonSchema(@Nullable JsonSchema jsonSchema)
      The JSON schema definition to use when type is JSON_SCHEMA.
      Parameters:
      jsonSchema - The JSON schema definition.
    • toString

      public String toString()
      Overrides:
      toString in class Object