Expand description
Exposed namespace of the module.
Structs§
- Chat
Completion Chunk - A single Server-Sent Events chunk from a streaming completion.
- Chat
Completion Request - Request body for the
POST chat/completionsendpoint. - Chat
Completion Response - Response body from the
POST chat/completionsendpoint. - Choice
- One completion alternative within a
ChatCompletionResponse. - Chunk
Choice - One delta choice within a streaming chunk.
- Client
- Async HTTP client for OpenAI-compatible REST APIs.
- Delta
- Partial message update delivered in a streaming chunk.
- Function
- Function specification (name, description, JSON Schema parameters).
- Function
Call - Name and arguments for a specific function invocation.
- Message
- A single message in a chat conversation.
- Open
AiCompat Environment Impl - Default OpenAI-compatible environment backed by in-memory values.
- Sync
Client - Blocking wrapper around
Clientfor use in synchronous contexts. - Tool
- A function tool definition passed in the
toolsarray of a request. - Tool
Call - A function invocation requested by the assistant.
- Usage
- Token usage statistics returned in every completion response.
Enums§
- Open
AiCompat Error - Error variants for OpenAI-compatible API operations.
- Role
- Role of a participant in a chat conversation.
Traits§
- Open
AiCompat Environment - Configuration contract for an OpenAI-compatible API environment.
Type Aliases§
- Result
- Crate-level result type backed by a boxed dynamic error.