How can I generate a JsonSchema without $refs and definitions?
And what is schemars generate for serde_json::Value?
#[derive(Serialize, Deserialize, JsonSchema)]
/// The parameters for the multi_call function
struct MultiCallParameters {
/// The function calls to make
calls: Vec<FunctionCall>
}
#[derive(Clone, Serialize, Deserialize, JsonSchema)]
/// A function call
pub struct FunctionCall {
/// The name of the function
pub name: String,
/// The arguments to the function
pub arguments: serde_json::Value
}
This is becoming extremely necessary now that Large Language Models are using JsonSchemas (without external definition references) for function calls.
How can I generate a JsonSchema without
$ref
s anddefinitions
?And what is schemars generate for serde_json::Value?
This is becoming extremely necessary now that Large Language Models are using JsonSchemas (without external definition references) for function calls.