diff --git a/src/v1/client.rs b/src/v1/client.rs index 89b7ea5..437b179 100644 --- a/src/v1/client.rs +++ b/src/v1/client.rs @@ -10,6 +10,7 @@ use std::{ use crate::v1::{chat, chat_stream, constants, embedding, error, model_list, tool, utils}; +#[derive(Debug)] pub struct Client { pub api_key: String, pub endpoint: String, diff --git a/src/v1/tool.rs b/src/v1/tool.rs index 4d85b31..1e07e77 100644 --- a/src/v1/tool.rs +++ b/src/v1/tool.rs @@ -1,6 +1,6 @@ use async_trait::async_trait; use serde::{Deserialize, Serialize}; -use std::{any::Any, collections::HashMap}; +use std::{any::Any, collections::HashMap, fmt::Debug}; // ----------------------------------------------------------------------------- // Definitions @@ -136,3 +136,9 @@ pub enum ToolChoice { pub trait Function { async fn execute(&self, arguments: String) -> Box; } + +impl Debug for dyn Function { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "Function()") + } +}