GenAI.Tool.Schema.Null
(GenAI Core v0.3.2)
Copy Markdown
Represents a schema for null types.
Summary
Functions
Convert Json map to a GenAI.Tool.Schema.Null struct, handling naming conventions.
Check if json is of type
Functions
Convert Json map to a GenAI.Tool.Schema.Null struct, handling naming conventions.
Examples
Is of Type
iex> GenAI.Tool.Schema.Null.from_json(%{"type" => "null", "description" => "A null value"})
{:ok, %GenAI.Tool.Schema.Null{type: "null", description: "A null value"}}Not of Type
iex> GenAI.Tool.Schema.Null.from_json(%{"type" => "number"})
{:error, :unrecognized_type}
Check if json is of type
Examples
Is of Type
iex> GenAI.Tool.Schema.Null.is_type(%{"type" => "null"})
trueNot of Type
iex> GenAI.Tool.Schema.Null.is_type(%{"type" => "string"})
false