async-openai
async-openai copied to clipboard
Rust library for OpenAI
OpenAI recently introduced the [Structured Outputs](https://openai.com/index/introducing-structured-outputs-in-the-api/) feature which ensures that responses will adhere to a predefined JSON schema. > Last year at DevDay, we introduced JSON mode—a useful building block...
Here is an error that results in failed deserialization error: ``` { "id": "...", "object": "vector_store.file", "usage_bytes": 0, "created_at": 1722298943, "vector_store_id": "...", "status": "failed", "last_error": { "code": "invalid_file", "message": "The...
For `CreateAssistantToolFileSearchResources` struct the API expects only one of the two fields to be used. Even an empty array is not accepted if the other field contains a value. Thus...
I was working on code that creates an assistant with attached pre-existing vector store. Unfortunately, it doesn't seem to be possible. Since both fields are currently non-`Option`, the only possible...
I tried listing my vector store file and received the following error. ``` value: JSONDeserialize(Error("unknown variant `unsupported_file`, expected one of `internal_error`, `file_not_found`, `parsing_error`, `unhandled_mime_type`", line: 204, column: 34)) ``` Doing...
See https://docs.rs/tracing/latest/tracing/#emitting-log-records. Would be helpful for use in python extension crates that want to use [pyo3-log](https://github.com/vorner/pyo3-log)
Support custom headers required for observability applications ``` let client = Client::with_config( OpenAIConfig::default() .with_api_base(api_base) .with_headers(HashMap::from([( "Helicone-Auth".to_string(), format!("Bearer {}", config_env_var("HELICONE_API_KEY")?), )])), ); ```
https://platform.openai.com/docs/api-reference/uploads
Maybe this is my lack of experience, but when I'm requesting just a full list of objects like files I have to write something like: ```rust let file_list = files.list::(&[]).await?;...
When attempting to list vector stores of a project where no store created yet the method `list` results in: ``` Error: JSONDeserialize(Error("invalid type: null, expected a string", line: 4, column:...