chore: make proxy in simple-chat configure (#134)
and remove some prints and some useless codes Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
This commit is contained in:
parent
3a97917cd7
commit
b6fabc8836
1 changed files with 14 additions and 35 deletions
|
|
@ -4,11 +4,10 @@ use std::{
|
|||
};
|
||||
|
||||
use anyhow::Result;
|
||||
use serde_json::Value;
|
||||
|
||||
use crate::{
|
||||
client::ChatClient,
|
||||
model::{CompletionRequest, Message, Tool as ModelTool},
|
||||
model::{CompletionRequest, Message},
|
||||
tool::{Tool as ToolTrait, ToolSet},
|
||||
};
|
||||
|
||||
|
|
@ -149,22 +148,3 @@ impl ChatSession {
|
|||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl ToolTrait for ModelTool {
|
||||
fn name(&self) -> String {
|
||||
self.name.clone()
|
||||
}
|
||||
|
||||
fn description(&self) -> String {
|
||||
self.description.clone()
|
||||
}
|
||||
|
||||
fn parameters(&self) -> Value {
|
||||
self.parameters.clone()
|
||||
}
|
||||
|
||||
async fn call(&self, _args: Value) -> Result<String> {
|
||||
unimplemented!("ModelTool can't be called directly, only for tool definition")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue