Skip to content

Commit

Permalink
clone result not store. Now assistant will fail to deserialize into A…
Browse files Browse the repository at this point in the history
…ssitant Object
  • Loading branch information
N3mes1s committed Nov 21, 2023
1 parent e09ea65 commit 445b1e1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/assistant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 445b1e1

Please sign in to comment.