Expand description
OpenAI API client library.
A type-safe, async client for the OpenAI Chat Completions API.
Structs§
- ApiKey
Auth - API key authentication (Bearer token).
- Choice
- A completion choice.
- Client
- OpenAI API client.
- Client
Builder - Client builder.
- Create
Chat Completion Request - Request to create a chat completion.
- Create
Chat Completion Response - Response from creating a chat completion.
- Error
Detail - Error detail.
- Error
Response - Error response from the API.
- Function
Call - Function call details.
- Function
Definition - Function definition.
- Message
- A message in the conversation.
- Model
- Model information.
- Model
List - List of models.
- Tool
- Tool definition.
- Tool
Call - Tool call made by the assistant.
- Usage
- Token usage statistics.
Enums§
- Open
AiError - OpenAI API error type.
- Role
- Message role.
Traits§
- Auth
Strategy - Authentication strategy trait.
Type Aliases§
- Result
- Result type alias for OpenAI operations.