pub struct OpenAIProviderConfig;Expand description
Provider configuration for OpenAI.
Trait Implementations§
Source§impl HasComponent<ProviderBuildComponent> for OpenAIProviderConfig
impl HasComponent<ProviderBuildComponent> for OpenAIProviderConfig
Source§type Provider = OpenAIProviderBuild
type Provider = OpenAIProviderBuild
The concrete provider type wired to
Name for this context.Source§impl HasComponent<ProviderMetadataComponent> for OpenAIProviderConfig
impl HasComponent<ProviderMetadataComponent> for OpenAIProviderConfig
Source§type Provider = OpenAIProviderConfig
type Provider = OpenAIProviderConfig
The concrete provider type wired to
Name for this context.Source§impl ProviderBuildProvider<OpenAIProviderConfig> for OpenAIProviderBuild
impl ProviderBuildProvider<OpenAIProviderConfig> for OpenAIProviderBuild
Source§fn build_provider(config: FactoryProviderConfig) -> Box<dyn LLMProvider>
fn build_provider(config: FactoryProviderConfig) -> Box<dyn LLMProvider>
Construct a boxed
LLMProvider from the given factory configuration.Source§impl ProviderMetadataProvider<OpenAIProviderConfig> for OpenAIProviderConfig
impl ProviderMetadataProvider<OpenAIProviderConfig> for OpenAIProviderConfig
Source§const PROVIDER_KEY: &'static str = "openai"
const PROVIDER_KEY: &'static str = "openai"
Registry key used to identify this provider in the factory.
Source§const DISPLAY_NAME: &'static str = "OpenAI"
const DISPLAY_NAME: &'static str = "OpenAI"
Human-readable display name.
Source§const DEFAULT_MODEL: &'static str = crate::config::constants::models::openai::DEFAULT_MODEL
const DEFAULT_MODEL: &'static str = crate::config::constants::models::openai::DEFAULT_MODEL
Default model identifier when none is specified.
Source§const API_BASE_URL: &'static str = crate::config::constants::urls::OPENAI_API_BASE
const API_BASE_URL: &'static str = crate::config::constants::urls::OPENAI_API_BASE
Base URL for the provider’s API endpoint.
Source§const BASE_URL_ENV_VAR: Option<&'static str>
const BASE_URL_ENV_VAR: Option<&'static str>
Optional environment variable that overrides the base URL.
Source§impl ProviderSpec for OpenAIProviderConfig
impl ProviderSpec for OpenAIProviderConfig
Source§const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY
const PROVIDER_KEY: &'static str = <Self as CanDescribeProvider>::PROVIDER_KEY
Registry key used to look up this provider in the factory.
Source§const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME
const DISPLAY_NAME: &'static str = <Self as CanDescribeProvider>::DISPLAY_NAME
Human-readable display name for this provider.
Source§const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL
const DEFAULT_MODEL: &'static str = <Self as CanDescribeProvider>::DEFAULT_MODEL
Default model identifier when none is specified.
Source§const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL
const API_BASE_URL: &'static str = <Self as CanDescribeProvider>::API_BASE_URL
Base URL for the provider’s API endpoint.
Source§const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR
const BASE_URL_ENV_VAR: Option<&'static str> = <Self as CanDescribeProvider>::BASE_URL_ENV_VAR
Optional environment variable that overrides the base URL.
Source§type PromptCacheSettings = ()
type PromptCacheSettings = ()
Provider-specific prompt cache configuration type.
Source§fn create_provider(
api_key: String,
model: String,
base_url: String,
prompt_cache_enabled: bool,
prompt_cache_settings: Self::PromptCacheSettings,
timeouts: TimeoutsConfig,
) -> Box<dyn LLMProvider>
fn create_provider( api_key: String, model: String, base_url: String, prompt_cache_enabled: bool, prompt_cache_settings: Self::PromptCacheSettings, timeouts: TimeoutsConfig, ) -> Box<dyn LLMProvider>
Construct a boxed
LLMProvider from the given configuration.Auto Trait Implementations§
impl Forget for OpenAIProviderConfig
impl Freeze for OpenAIProviderConfig
impl Move for OpenAIProviderConfig
impl RefUnwindSafe for OpenAIProviderConfig
impl Send for OpenAIProviderConfig
impl Sync for OpenAIProviderConfig
impl Unpin for OpenAIProviderConfig
impl UnsafeUnpin for OpenAIProviderConfig
impl UnwindSafe for OpenAIProviderConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<Ctx> CanBuildProvider for Ctxwhere
Ctx: HasComponent<ProviderBuildComponent>,
<Ctx as HasComponent<ProviderBuildComponent>>::Provider: ProviderBuildProvider<Ctx>,
impl<Ctx> CanBuildProvider for Ctxwhere
Ctx: HasComponent<ProviderBuildComponent>,
<Ctx as HasComponent<ProviderBuildComponent>>::Provider: ProviderBuildProvider<Ctx>,
Source§fn build_provider(config: ProviderConfig) -> Box<dyn LLMProvider>
fn build_provider(config: ProviderConfig) -> Box<dyn LLMProvider>
Construct a boxed
LLMProvider from the given factory configuration.Source§impl<Ctx> CanDescribeProvider for Ctxwhere
Ctx: HasComponent<ProviderMetadataComponent>,
<Ctx as HasComponent<ProviderMetadataComponent>>::Provider: ProviderMetadataProvider<Ctx>,
impl<Ctx> CanDescribeProvider for Ctxwhere
Ctx: HasComponent<ProviderMetadataComponent>,
<Ctx as HasComponent<ProviderMetadataComponent>>::Provider: ProviderMetadataProvider<Ctx>,
Source§const PROVIDER_KEY: &'static str = const PROVIDER_KEY: &'static str =
<ComponentProvider<Ctx, ProviderMetadataComponent> as
ProviderMetadataProvider::<Ctx>>::PROVIDER_KEY;
const PROVIDER_KEY: &'static str = const PROVIDER_KEY: &'static str = <ComponentProvider<Ctx, ProviderMetadataComponent> as ProviderMetadataProvider::<Ctx>>::PROVIDER_KEY;
Registry key used to identify this provider in the factory.
Source§const DISPLAY_NAME: &'static str = const DISPLAY_NAME: &'static str =
<ComponentProvider<Ctx, ProviderMetadataComponent> as
ProviderMetadataProvider::<Ctx>>::DISPLAY_NAME;
const DISPLAY_NAME: &'static str = const DISPLAY_NAME: &'static str = <ComponentProvider<Ctx, ProviderMetadataComponent> as ProviderMetadataProvider::<Ctx>>::DISPLAY_NAME;
Human-readable display name.
Source§const DEFAULT_MODEL: &'static str = const DEFAULT_MODEL: &'static str =
<ComponentProvider<Ctx, ProviderMetadataComponent> as
ProviderMetadataProvider::<Ctx>>::DEFAULT_MODEL;
const DEFAULT_MODEL: &'static str = const DEFAULT_MODEL: &'static str = <ComponentProvider<Ctx, ProviderMetadataComponent> as ProviderMetadataProvider::<Ctx>>::DEFAULT_MODEL;
Default model identifier when none is specified.
Source§const API_BASE_URL: &'static str = const API_BASE_URL: &'static str =
<ComponentProvider<Ctx, ProviderMetadataComponent> as
ProviderMetadataProvider::<Ctx>>::API_BASE_URL;
const API_BASE_URL: &'static str = const API_BASE_URL: &'static str = <ComponentProvider<Ctx, ProviderMetadataComponent> as ProviderMetadataProvider::<Ctx>>::API_BASE_URL;
Base URL for the provider’s API endpoint.
Source§const BASE_URL_ENV_VAR: Option<&'static str> = const BASE_URL_ENV_VAR: Option<&'static str> =
<ComponentProvider<Ctx, ProviderMetadataComponent> as
ProviderMetadataProvider::<Ctx>>::BASE_URL_ENV_VAR;
const BASE_URL_ENV_VAR: Option<&'static str> = const BASE_URL_ENV_VAR: Option<&'static str> = <ComponentProvider<Ctx, ProviderMetadataComponent> as ProviderMetadataProvider::<Ctx>>::BASE_URL_ENV_VAR;
Optional environment variable that overrides the base URL.
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more