ProviderBuilder

Trait ProviderBuilder 

Source
pub trait ProviderBuilder: Sized {
    type Output: Provider;
    type ApiKey;

    const BASE_URL: &'static str;

    // Provided method
    fn finish<H>(
        &self,
        builder: ClientBuilder<Self, Self::ApiKey, H>,
    ) -> Result<ClientBuilder<Self, Self::ApiKey, H>> { ... }
}
Expand description

An API provider extension builder, this abstracts over provider-specific builders which are able to configure and produce a given provider’s extension type

See Provider

Required Associated Constants§

Source

const BASE_URL: &'static str

Required Associated Types§

Provided Methods§

Source

fn finish<H>( &self, builder: ClientBuilder<Self, Self::ApiKey, H>, ) -> Result<ClientBuilder<Self, Self::ApiKey, H>>

This method can be used to customize the fields of builder before it is used to create a client. For example, adding default headers

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl ProviderBuilder for AnthropicBuilder

Source§

const BASE_URL: &'static str = "https://api.anthropic.com"

Source§

type Output = AnthropicExt

Source§

type ApiKey = AnthropicKey

Source§

impl ProviderBuilder for AzureExtBuilder

Source§

impl ProviderBuilder for CohereBuilder

Source§

const BASE_URL: &'static str = "https://api.cohere.ai"

Source§

type Output = CohereExt

Source§

type ApiKey = BearerAuth

Source§

impl ProviderBuilder for DeepSeekExtBuilder

Source§

const BASE_URL: &'static str = DEEPSEEK_API_BASE_URL

Source§

type Output = DeepSeekExt

Source§

type ApiKey = BearerAuth

Source§

impl ProviderBuilder for GaladrielBuilder

Source§

const BASE_URL: &'static str = GALADRIEL_API_BASE_URL

Source§

type Output = GaladrielExt

Source§

type ApiKey = BearerAuth

Source§

impl ProviderBuilder for GeminiBuilder

Source§

const BASE_URL: &'static str = GEMINI_API_BASE_URL

Source§

type Output = GeminiExt

Source§

type ApiKey = GeminiApiKey

Source§

impl ProviderBuilder for GroqBuilder

Source§

const BASE_URL: &'static str = GROQ_API_BASE_URL

Source§

type Output = GroqExt

Source§

type ApiKey = BearerAuth

Source§

impl ProviderBuilder for HuggingFaceBuilder

Source§

const BASE_URL: &'static str = HUGGINGFACE_API_BASE_URL

Source§

type Output = HuggingFaceExt

Source§

type ApiKey = BearerAuth

Source§

impl ProviderBuilder for HyperbolicBuilder

Source§

const BASE_URL: &'static str = HYPERBOLIC_API_BASE_URL

Source§

type Output = HyperbolicExt

Source§

type ApiKey = BearerAuth

Source§

impl ProviderBuilder for MiraBuilder

Source§

const BASE_URL: &'static str = MIRA_API_BASE_URL

Source§

type Output = MiraExt

Source§

type ApiKey = BearerAuth

Source§

impl ProviderBuilder for MistralBuilder

Source§

const BASE_URL: &'static str = MISTRAL_API_BASE_URL

Source§

type Output = MistralExt

Source§

type ApiKey = BearerAuth

Source§

impl ProviderBuilder for MoonshotBuilder

Source§

const BASE_URL: &'static str = MOONSHOT_API_BASE_URL

Source§

type Output = MoonshotExt

Source§

type ApiKey = BearerAuth

Source§

impl ProviderBuilder for OllamaBuilder

Source§

const BASE_URL: &'static str = OLLAMA_API_BASE_URL

Source§

type Output = OllamaExt

Source§

type ApiKey = Nothing

Source§

impl ProviderBuilder for OpenAICompletionsExtBuilder

Source§

const BASE_URL: &'static str = OPENAI_API_BASE_URL

Source§

type Output = OpenAICompletionsExt

Source§

type ApiKey = BearerAuth

Source§

impl ProviderBuilder for OpenAIResponsesExtBuilder

Source§

const BASE_URL: &'static str = OPENAI_API_BASE_URL

Source§

type Output = OpenAIResponsesExt

Source§

type ApiKey = BearerAuth

Source§

impl ProviderBuilder for OpenRouterExtBuilder

Source§

const BASE_URL: &'static str = OPENROUTER_API_BASE_URL

Source§

type Output = OpenRouterExt

Source§

type ApiKey = BearerAuth

Source§

impl ProviderBuilder for PerplexityBuilder

Source§

const BASE_URL: &'static str = PERPLEXITY_API_BASE_URL

Source§

type Output = PerplexityExt

Source§

type ApiKey = BearerAuth

Source§

impl ProviderBuilder for TogetherExtBuilder

Source§

const BASE_URL: &'static str = TOGETHER_AI_BASE_URL

Source§

type Output = TogetherExt

Source§

type ApiKey = BearerAuth

Source§

impl ProviderBuilder for VoyageBuilder

Source§

const BASE_URL: &'static str = VOYAGEAI_API_BASE_URL

Source§

type Output = VoyageExt

Source§

type ApiKey = BearerAuth

Source§

impl ProviderBuilder for XAiExtBuilder

Source§

const BASE_URL: &'static str = XAI_BASE_URL

Source§

type Output = XAiExt

Source§

type ApiKey = BearerAuth