async-openai icon indicating copy to clipboard operation
async-openai copied to clipboard

Rust library for OpenAI

Results 110 async-openai issues
Sort by recently updated
recently updated
newest added

`ChatCompletionRequestMessage` didn't have `From` I went to add it, and found the TODO: ``` // todo: write macro for bunch of same looking From trait implementations below ``` The crate...

`realtime` feature in the crate was written without the spec, it seems be available now in the upstream spec.

spec sync

There are many new changes in spec. This issue will be open for any future PR to address it on rolling basis. Please consider sending PR which syncs spec. Each...

spec sync

Without this, cancelled responses fail to parse: ``` called `Result::unwrap()` on an `Err` value: JSON decode error: unknown variant `cancelled`, expected `incomplete` or `failed` ```

Server events `MaxResponseOutputTokens` will currently not parse: ``` called `Result::unwrap()` on an `Err` value: JSON decode error: data did not match any variant of untagged enum MaxResponseOutputTokens ``` This fixes...

The [API docs](https://platform.openai.com/docs/api-reference/realtime-server-events/input_audio_buffer/committed) suggest that `previous_item_id` is non-nullable, but this isn't true. Here's an event I got back from the OpenAI API: ```json {"type":"input_audio_buffer.committed","event_id":"...","previous_item_id":null,"item_id":"..."} ```

For the realtime types, [`AudioTranscription` currently has an `enabled` field](https://docs.rs/async-openai/latest/async_openai/types/realtime/struct.AudioTranscription.html#structfield.enabled), but the [API does not have this](https://platform.openai.com/docs/api-reference/realtime-client-events/session/update). This triggers an error when trying to set an audio transcription on session...