Crate lib_client_openai

Crate lib_client_openai 

Source
Expand description

OpenAI API client library.

A type-safe, async client for the OpenAI Chat Completions API.

Structs§

ApiKeyAuth
API key authentication (Bearer token).
Choice
A completion choice.
Client
OpenAI API client.
ClientBuilder
Client builder.
CreateChatCompletionRequest
Request to create a chat completion.
CreateChatCompletionResponse
Response from creating a chat completion.
ErrorDetail
Error detail.
ErrorResponse
Error response from the API.
FunctionCall
Function call details.
FunctionDefinition
Function definition.
Message
A message in the conversation.
Model
Model information.
ModelList
List of models.
Tool
Tool definition.
ToolCall
Tool call made by the assistant.
Usage
Token usage statistics.

Enums§

OpenAiError
OpenAI API error type.
Role
Message role.

Traits§

AuthStrategy
Authentication strategy trait.

Type Aliases§

Result
Result type alias for OpenAI operations.