From 445b1e1480f05ee304fa2ce5b3c8dca347fba6cd Mon Sep 17 00:00:00 2001 From: Giuseppe Massaro Date: Tue, 21 Nov 2023 09:10:02 +0100 Subject: [PATCH] clone result not store. Now assistant will fail to deserialize into Assitant Object --- examples/assistant.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/assistant.rs b/examples/assistant.rs index 0b344bf..1eb0f84 100644 --- a/examples/assistant.rs +++ b/examples/assistant.rs @@ -14,10 +14,11 @@ fn main() -> Result<(), Box> { 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);