You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let req = AssistantRequest::new(GPT4_1106_PREVIEW.to_string());
16
+
let req = AssistantRequest::new(GPT4_O.to_string());
17
17
let req = req
18
18
.clone()
19
19
.description("this is a test assistant".to_string());
20
20
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());
21
21
let req = req.clone().tools(vec![tools]);
22
-
println!("{:?}", req);
22
+
println!("AssistantRequest: {:?}", req);
23
23
24
24
let result = client.create_assistant(req)?;
25
-
println!("{:?}", result.id);
25
+
println!("Create Assistant Result ID: {:?}", result.id);
26
26
27
27
let thread_req = CreateThreadRequest::new();
28
28
let thread_result = client.create_thread(thread_req)?;
29
-
println!("{:?}", thread_result.id.clone());
29
+
println!("Create Thread Result ID: {:?}", thread_result.id.clone());
30
30
31
31
let message_req = CreateMessageRequest::new(
32
32
MessageRole::user,
33
33
"`I need to solve the equation 3x + 11 = 14. Can you help me?".to_string(),
34
34
);
35
35
36
36
let message_result = client.create_message(thread_result.id.clone(), message_req)?;
37
-
println!("{:?}", message_result.id.clone());
37
+
println!("Create Message Result ID: {:?}", message_result.id.clone());
38
38
39
39
let run_req = CreateRunRequest::new(result.id);
40
40
let run_result = client.create_run(thread_result.id.clone(), run_req)?;
41
+
println!("Create Run Result ID: {:?}", run_result.id.clone());
0 commit comments