async-openai
async-openai copied to clipboard
Rust library for OpenAI
While Using Responses api, I found that `instructions` Fields can be Listed response. Expected: ```json { ... "instructions": "Structure My Json" } ``` Response: ```json { "instructions": [ { "type":...
bug: changing top_logprobs from u32 to u8 to be consistent with chat
Hi, looking forward to introduce an `Option` for creating the `assistant`, or `CreateRunRequest` , etc.
This PR modifies the chat types, specifically the `ChatCompletionMessageToolCall` struct, to make it compatible with the Mistral API. Mistral does not specify the `type` when it calls a function, but...
Some APIs are close to being compatible with this crate. The byot (bring your own type) feature is handy, but useless when the path is incompatible. For example, [Ollama's chat...
OpenAI's Python library allows adding extra arguments to the request body via the [`extra_body`](https://github.com/openai/openai-python/blob/56540b32873df335aca9270715a839c2a9770639/src/openai/resources/chat/completions/completions.py#L114) kwarg. This is useful to, e.g., [control thinking modes](https://qwen.readthedocs.io/en/latest/deployment/vllm.html#thinking-non-thinking-modes) for Qwen. This PR adds the `extra_body`...
When using a client that has a malformed `api_base` is used in a streaming request, the library panics. This is because in line 413 of the `src/client.rs` file, the eventsource...
backoff is unmaintained https://rustsec.org/advisories/RUSTSEC-2025-0012 and it is recommended to use backon #264. This is a breaking change.
I'm trying to see how one can send files (not images) as message args, and couldn't find anything matching the open ai spec here : https://platform.openai.com/docs/guides/pdf-files?api-mode=responses The openAPI doc mentions...
`derive_builder` lets users create partially initialized models which results in lot more unnecessary boilerplate and needing to deal with errors that can be avoided during compile time instead (using the...