GenAI.Tool.Schema.Null (GenAI Core v0.2.0)
Represents a schema for null types.
Link to this section Summary
Functions
Convert Json map to a GenAI.Tool.Schema.Null
struct, handling naming conventions.
Check if json is of type
Link to this section Functions
Link to this function
from_json(json)
Convert Json map to a GenAI.Tool.Schema.Null
struct, handling naming conventions.
examples
Examples
is-of-type
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
Not of Type
iex> GenAI.Tool.Schema.Null.from_json(%{"type" => "number"})
{:error, :unrecognized_type}
Link to this function
is_type(arg1)
Check if json is of type
examples
Examples
is-of-type
Is of Type
iex> GenAI.Tool.Schema.Null.is_type(%{"type" => "null"})
true
not-of-type
Not of Type
iex> GenAI.Tool.Schema.Null.is_type(%{"type" => "string"})
false