Expand description
This module provides traits for defining and creating provider clients. Clients are used to create models for completion, embeddings, etc. Dyn-compatible traits have been provided to allow for more provider-agnostic code.
Re-exports§
pub use completion::CompletionClient;pub use embeddings::EmbeddingsClient;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 - Final
Completion Response - The final streaming response from a dynamic client.
- Needs
ApiKey - Nothing
- A type containing nothing at all. For
Option-like behavior on the type level, i.e. to describe the lack of an API key in aClientBuilder
Enums§
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 use 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