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
OpenAIAPIs. - Generic
OpenAI Builder - Builder for
GenericOpenAI. - OpenAI
Config - Configuration for OpenAI API
- Options
- The
Optionsstruct holds configuration options for theOpenAIclient. 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
OpenAIstruct encapsulates anOpenAIclient and default options for embedding and prompt models. It uses theBuilderpattern for flexible and customizable instantiation. - OpenAI
Builder