use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
pub struct RunToolCallObjectFunction {
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "arguments")]
pub arguments: String,
}
impl RunToolCallObjectFunction {
pub fn new(name: String, arguments: String) -> RunToolCallObjectFunction {
RunToolCallObjectFunction { name, arguments }
}
}
impl std::fmt::Display for RunToolCallObjectFunction {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match serde_json::to_string(self) {
Ok(s) => write!(f, "{}", s),
Err(_) => Err(std::fmt::Error),
}
}
}