Expand description
This module provides traits for defining and creating provider clients. Clients are used to create models for completion, embeddings, etc.
Re-exports§
pub use completion::CompletionClient;pub use embeddings::EmbeddingsClient;pub use model_listing::ModelLister;pub use model_listing::ModelListingClient;pub use verify::VerifyClient;pub use verify::VerifyError;
Modules§
Structs§
- Bearer
Auth - An API key which will be inserted into a
Client’s default headers as a bearer auth token - Capable
- A wrapper type providing runtime checks on a provider’s capabilities via the Capability trait
- Client
- Client
Builder - Nothing
- A type containing nothing at all. For
Option-like behavior on the type level, i.e. to describe the lack of a capability or field (an API key, for instance)
Enums§
- Client
Builder Error - Provider
Client Error - Errors returned while constructing provider clients from environment variables or explicit input.
- Transport
Traits§
- ApiKey
- A trait for API keys. This determines whether the key is inserted into a Client’s default
headers (in the
Somecase) or handled by a given provider extension (in theNonecase) - Capabilities
- The capabilities of a given provider, i.e. embeddings, audio transcriptions, text completion
- Capability
- Debug
Ext - Provider
- An API provider extension, this abstracts over extensions which may be used in conjunction with
the
Client<Ext, H>struct to define the behavior of a provider with respect to networking, auth, instantiating models - Provider
Builder - An API provider extension builder, this abstracts over provider-specific builders which are able to configure and produce a given provider’s extension type
- Provider
Client - Abstracts over the ability to instantiate a client, either via environment variables or some
Self::Input
Functions§
- optional_
env_ var - Read an optional environment variable for provider client construction.
- required_
env_ var - Read a required environment variable for provider client construction.
Type Aliases§
- Provider
Client Result - Result type returned by provider client construction helpers.