GenAI.Tool.Schema.String (GenAI Core v0.1.0)

Represents a schema for string types, converting JSON schema attributes to Elixir struct fields.

Link to this section Summary

Functions

Converts a JSON map to a GenAI.Tool.Schema.String struct, handling naming conventions.

Link to this section Types

@type t() :: %GenAI.Tool.Schema.String{
  description: String.t() | nil,
  format: String.t() | nil,
  max_length: integer() | nil,
  min_length: integer() | nil,
  pattern: String.t() | nil,
  type: String.t()
}

Link to this section Functions

Link to this function

from_json(attributes)

@spec from_json(map()) :: t()

Converts a JSON map to a GenAI.Tool.Schema.String struct, handling naming conventions.