pub struct DynLanguageModel<'dynosaur_struct> { /* private fields */ }Implementations§
Source§impl<'dynosaur_struct> DynLanguageModel<'dynosaur_struct>
impl<'dynosaur_struct> DynLanguageModel<'dynosaur_struct>
pub fn new_box( value: impl LanguageModel + 'dynosaur_struct, ) -> Box<DynLanguageModel<'dynosaur_struct>>
pub fn new_arc( value: impl LanguageModel + 'dynosaur_struct, ) -> Arc<DynLanguageModel<'dynosaur_struct>>
pub fn new_rc( value: impl LanguageModel + 'dynosaur_struct, ) -> Rc<DynLanguageModel<'dynosaur_struct>>
pub const fn from_box( value: Box<impl LanguageModel + 'dynosaur_struct>, ) -> Box<DynLanguageModel<'dynosaur_struct>>
pub const fn from_ref( value: &(impl LanguageModel + 'dynosaur_struct), ) -> &DynLanguageModel<'dynosaur_struct>
pub const fn from_mut( value: &mut (impl LanguageModel + 'dynosaur_struct), ) -> &mut DynLanguageModel<'dynosaur_struct>
Trait Implementations§
Source§impl<'dynosaur_struct> LanguageModel for DynLanguageModel<'dynosaur_struct>
impl<'dynosaur_struct> LanguageModel for DynLanguageModel<'dynosaur_struct>
Source§fn provider_name(&self) -> &str
fn provider_name(&self) -> &str
Provider name, e.g. “openai”, “anthropic”, etc.
Source§fn model_id(&self) -> &str
fn model_id(&self) -> &str
The upstream model ID, e.g. “gpt-4o”, “claude-3-5-sonnet-20241022”, etc.
Source§fn supported_urls(&self) -> impl Future<Output = Record<String, Regex>> + Send
fn supported_urls(&self) -> impl Future<Output = Record<String, Regex>> + Send
Media type -> Regex for supported URLs of that media type Read more
Source§fn generate(
&self,
options: LanguageModelCallOptions,
) -> impl Future<Output = Result<LanguageModelGenerateResult>> + Send
fn generate( &self, options: LanguageModelCallOptions, ) -> impl Future<Output = Result<LanguageModelGenerateResult>> + Send
Generates content based on the given options.
Source§fn stream(
&self,
options: LanguageModelCallOptions,
) -> impl Future<Output = Result<LanguageModelStreamResult>> + Send
fn stream( &self, options: LanguageModelCallOptions, ) -> impl Future<Output = Result<LanguageModelStreamResult>> + Send
Generates content based on the given options, but returns a stream of partial results.