Available on crate feature
openai
only.Expand description
This module provides integration with OpenAI
’s API, enabling the use of language models and
embeddings within the Swiftide project. It includes the OpenAI
struct for managing API clients
and default options for embedding and prompt models. The module is conditionally compiled based
on the “openai” feature flag.
Structs§
- Azure
Config - Configuration for Azure OpenAI Service
- Generic
OpenAI - Generic client for
OpenAI
APIs. - Generic
OpenAI Builder - Builder for
GenericOpenAI
. - OpenAI
Config - Configuration for OpenAI API
- Options
- The
Options
struct holds configuration options for theOpenAI
client. It includes optional fields for specifying the embedding and prompt models. - Options
Builder - Builder for
Options
.
Enums§
- Generic
OpenAI Builder Error - Error type for GenericOpenAIBuilder
- Options
Builder Error - Error type for OptionsBuilder
Functions§
Type Aliases§
- OpenAI
- The
OpenAI
struct encapsulates anOpenAI
client and default options for embedding and prompt models. It uses theBuilder
pattern for flexible and customizable instantiation. - OpenAI
Builder