Skip to main content

DynLanguageModel

Struct DynLanguageModel 

Source
pub struct DynLanguageModel<'dynosaur_struct> { /* private fields */ }

Implementations§

Source§

impl<'dynosaur_struct> DynLanguageModel<'dynosaur_struct>

Source

pub fn new_box( value: impl LanguageModel + 'dynosaur_struct, ) -> Box<DynLanguageModel<'dynosaur_struct>>

Source

pub fn new_arc( value: impl LanguageModel + 'dynosaur_struct, ) -> Arc<DynLanguageModel<'dynosaur_struct>>

Source

pub fn new_rc( value: impl LanguageModel + 'dynosaur_struct, ) -> Rc<DynLanguageModel<'dynosaur_struct>>

Source

pub const fn from_box( value: Box<impl LanguageModel + 'dynosaur_struct>, ) -> Box<DynLanguageModel<'dynosaur_struct>>

Source

pub const fn from_ref( value: &(impl LanguageModel + 'dynosaur_struct), ) -> &DynLanguageModel<'dynosaur_struct>

Source

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>

Source§

fn provider_name(&self) -> &str

Provider name, e.g. “openai”, “anthropic”, etc.
Source§

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

Media type -> Regex for supported URLs of that media type Read more
Source§

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

Generates content based on the given options, but returns a stream of partial results.

Auto Trait Implementations§

§

impl<'dynosaur_struct> !Freeze for DynLanguageModel<'dynosaur_struct>

§

impl<'dynosaur_struct> !RefUnwindSafe for DynLanguageModel<'dynosaur_struct>

§

impl<'dynosaur_struct> Send for DynLanguageModel<'dynosaur_struct>

§

impl<'dynosaur_struct> !Sized for DynLanguageModel<'dynosaur_struct>

§

impl<'dynosaur_struct> Sync for DynLanguageModel<'dynosaur_struct>

§

impl<'dynosaur_struct> !Unpin for DynLanguageModel<'dynosaur_struct>

§

impl<'dynosaur_struct> !UnsafeUnpin for DynLanguageModel<'dynosaur_struct>

§

impl<'dynosaur_struct> !UnwindSafe for DynLanguageModel<'dynosaur_struct>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more