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

A simple Rust library for OpenAI API, free from complex async operations and redundant dependencies.

Results 17 openai-api issues
Sort by recently updated
recently updated
newest added

This PR introduces a new `Credentials` struct that consolidates API key and base URL configuration, enabling simpler client initialization. The main benefits are: - Single container for auth and URL...

feat(serialization): add two-decimal precision serialization for float fields Added a new `serialize_f32_two_decimals` helper function to serialize Option fields with exactly two decimal places. Applied this serialization to all float fields...

Because reasoning models a la `o1-mini` don't return all generated tokens the variable `max_tokens `was renamed in the official API to `max_completion_tokens`. `max_tokens `is consifered deprecated for chat models but...

```rust let body = ChatBody { model: "gpt-3.5-turbo".to_string(), max_tokens: Some(15), temperature: Some(0_f32), top_p: Some(0.5_f32), n: None, stream: Some(true), // this argument stop: None, presence_penalty: None, frequency_penalty: None, logit_bias: None, user:...

Current Message struct cannot use for representing function call message.

Although the[ OpenAI API supports audio file formats ](https://help.openai.com/en/articles/7031512-whisper-audio-api-faq)of: - m4a - mp3 - webm - mp4 - mpga - wav - mpeg and apparently according to the current API...

Optionally enabled using native certificates for https connections.