Class JsonSchema.JsonSchemaBuilder

java.lang.Object
nl.dannyj.mistral.models.completion.tool.JsonSchema.JsonSchemaBuilder
Enclosing class:
JsonSchema

public static class JsonSchema.JsonSchemaBuilder extends Object
  • Method Details

    • name

      The name of the schema.
      Parameters:
      name - The name of the schema.
      Returns:
      this.
    • description

      public JsonSchema.JsonSchemaBuilder description(String description)
      An optional description of the schema.
      Parameters:
      description - The description of the schema.
      Returns:
      this.
    • schema

      public JsonSchema.JsonSchemaBuilder schema(String schema)
      The JSON schema definition, represented as a String.
      Parameters:
      schema - The string representing the JSON schema.
      Returns:
      this.
    • strict

      public JsonSchema.JsonSchemaBuilder strict(boolean strict)
      Whether the schema should be strictly adhered to. Defaults to false.
      Parameters:
      strict - Whether the schema is strict.
      Returns:
      this.
    • build

      public JsonSchema build()
    • toString

      public String toString()
      Overrides:
      toString in class Object