pub type ToolUseInput = Value;Expand description
Re-exports of the v2 wire types per ADR 0015. v2 is shipped as
part of inferd-client 0.2 so consumers building against v2 can
reach the proto types without a separate inferd-proto dep.
Free-form JSON object representing a tool’s invocation arguments.
Type-aliased to serde_json::Value deliberately: the daemon does
not enforce the consumer’s Tool::input_schema (that’s the
consumer’s responsibility before executing the tool). The daemon
guarantees only that the model’s emitted JSON parses; semantic
validation lives in the consumer.
Aliased Type§
pub enum ToolUseInput {
Null,
Bool(bool),
Number(Number),
String(String),
Array(Vec<Value>),
Object(Map<String, Value>),
}Variants§
Null
Represents a JSON null value.
let v = json!(null);Bool(bool)
Represents a JSON boolean.
let v = json!(true);Number(Number)
Represents a JSON number, whether integer or floating point.
let v = json!(12.5);String(String)
Represents a JSON string.
let v = json!("a string");Array(Vec<Value>)
Represents a JSON array.
let v = json!(["an", "array"]);Object(Map<String, Value>)
Represents a JSON object.
By default the map is backed by a BTreeMap. Enable the preserve_order
feature of serde_json to use IndexMap instead, which preserves
entries in the order they are inserted into the map. In particular, this
allows JSON data to be deserialized into a Value and serialized to a
string while retaining the order of map keys in the input.
let v = json!({ "an": "object" });