use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
pub struct ChatCompletionMessageCustomToolCallCustom {
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "input")]
pub input: String,
}
impl ChatCompletionMessageCustomToolCallCustom {
pub fn new(name: String, input: String) -> ChatCompletionMessageCustomToolCallCustom {
ChatCompletionMessageCustomToolCallCustom { name, input }
}
}
impl std::fmt::Display for ChatCompletionMessageCustomToolCallCustom {
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),
}
}
}