clone result not store. Now assistant will fail to deserialize into Assitant Object

This commit is contained in:
Giuseppe Massaro
2023-11-21 09:10:02 +01:00
parent e09ea65b77
commit 445b1e1480

View File

@ -14,10 +14,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
tools.insert("type".to_string(), "code_interpreter".to_string());
let req = AssistantRequest::new(GPT4_1106_PREVIEW.to_string());
req.clone()
.description("this is a test assistant".to_string());
req.clone().instructions("You are a personal math tutor. When asked a question, write and run Python code to answer the question.".to_string());
req.clone().tools(vec![tools]);
let req = req.clone().description("this is a test assistant".to_string());
let req = req.clone().instructions("You are a personal math tutor. When asked a question, write and run Python code to answer the question.".to_string());
let req = req.clone().tools(vec![tools]);
println!("{:?}", req);
let result = client.create_assistant(req)?;
println!("{:?}", result.id);