Skip to main content

vv_agent/types/
metadata.rs

1use std::collections::BTreeMap;
2
3use serde::Serialize;
4use serde_json::Value;
5
6pub type Metadata = BTreeMap<String, Value>;
7pub type ToolArguments = BTreeMap<String, Value>;
8pub type ToolSchema = Value;
9
10pub fn json_value_from_serializable<T: Serialize>(value: &T) -> Value {
11    serde_json::to_value(value).unwrap_or(Value::Null)
12}