Closed niklasHack2810 closed 1 week ago
@niklasHack2810 Could you paste the snippet of code you executed? Like https://github.com/dongri/openai-api-rs/blob/main/examples/assistant.rs#L12-L24
@dongri This line fails:
let run = self.client.create_run(thread_id.clone(), CreateRunRequest::new(ASSISTANT_ID.to_string())).await?;
self.client is your OpenAIClient, thread_id is from a previous request to client.create_thread. The ASSISTANT_ID is just a constant &str.
Fixed Please use v5.2.2
Thank you, it works now :)
Describe the bug
Creating a run with an assistant with file search throws an error:
Error: OpenAI: APIError: Failed to parse JSON: invalid type: map, expected a string at line 20 column 21 / response
This happens in the tools property. The actual content of the property is the following:
In the library, it is defined as
To Reproduce
Code snippets
No response
OS
Linux
Rust version
1.82.0
Library version
5.2.1