Skip to main content

ExtensionOptions

Trait ExtensionOptions 

Source
pub trait ExtensionOptions:
    Serialize
    + Clone
    + Debug
    + Send
    + Sync
    + UnwindSafe
    + RefUnwindSafe
    + 'static {
    type Ext: ProviderExtension<Options = Self>;

    // Provided method
    fn unsupported(
        &self,
        target: &dyn ReplayTarget,
        request: &CompletionRequest,
    ) -> Vec<(&'static str, String)> { ... }
}
Expand description

A provider’s request options. Serialize-only: the body keys they write are their only output. They are plain data, Send + Sync on every target, since a request carrying them is a component of an ECS world, and unwind safe, so a request holding them stays unwind safe.

Required Associated Types§

Source

type Ext: ProviderExtension<Options = Self>

The provider these options are for: the entry ProviderOptions::set stores them under. A type that serves as the Options of several providers names one of them here, and is stored for the others with ProviderOptions::with.

Provided Methods§

Source

fn unsupported( &self, target: &dyn ReplayTarget, request: &CompletionRequest, ) -> Vec<(&'static str, String)>

The fields target cannot send for request, each a top-level body key with the reason. Each one set is reported through the request’s OnUnsupported policy under the name "<provider>.<section>.<field>". It must not call options::param, which reads it. By default every field is sent.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ExtensionOptions for AnthropicOptions

Source§

impl ExtensionOptions for AzureOptions

Source§

impl ExtensionOptions for ChatGptOptions

Source§

impl ExtensionOptions for CohereOptions

Source§

impl ExtensionOptions for CopilotOptions

Source§

impl ExtensionOptions for DeepSeekOptions

Source§

impl ExtensionOptions for GeminiOptions

Source§

impl ExtensionOptions for GroqOptions

Source§

impl ExtensionOptions for LlamaCppOptions

Source§

impl ExtensionOptions for MiniMaxOptions

Source§

impl ExtensionOptions for MistralOptions

Source§

impl ExtensionOptions for MoonshotOptions

Source§

impl ExtensionOptions for OllamaOptions

Source§

impl ExtensionOptions for OpenAiOptions

Source§

impl ExtensionOptions for OpenRouterOptions

Source§

impl ExtensionOptions for PerplexityOptions

Source§

impl ExtensionOptions for TogetherOptions

Source§

impl ExtensionOptions for VeniceOptions

Source§

impl ExtensionOptions for XaiOptions

Source§

impl ExtensionOptions for XiaomiMimoOptions

Source§

impl ExtensionOptions for ZaiOptions