Model

Enum Model 

Source
pub enum Model {
Show 33 variants Tiny, TinyQ5_1, TinyQ8_0, TinyEn, TinyEnQ5_1, TinyEnQ8_0, Base, BaseQ5_1, BaseQ8_0, BaseEn, BaseEnQ5_1, BaseEnQ8_0, Small, SmallQ5_1, SmallQ8_0, SmallEn, SmallEnQ5_1, SmallEnQ8_0, Medium, MediumQ5_0, MediumQ8_0, MediumEn, MediumEnQ5_0, MediumEnQ8_0, Large, LargeV2, LargeV2Q5_0, LargeV2Q8_0, LargeV3, LargeV3Q5_0, LargeV3Turbo, LargeV3TurboQ5_0, LargeV3TurboQ8_0,
}
Expand description

OpenAI supported models

Variants§

§

Tiny

The tiny model.

§

TinyQ5_1

The tiny-q5_1 model.

§

TinyQ8_0

The tiny-q8_0 model.

§

TinyEn

The tiny model with only English support.

§

TinyEnQ5_1

The tiny-q5_1 model with only English support.

§

TinyEnQ8_0

The tiny-q8_0 model with only English support.

§

Base

The base model.

§

BaseQ5_1

The base-q5_1 model.

§

BaseQ8_0

The base-q8_0 model.

§

BaseEn

The base model with only English support.

§

BaseEnQ5_1

The base-q5_1 model with only English support.

§

BaseEnQ8_0

The base-q8_0 model with only English support.

§

Small

The small model.

§

SmallQ5_1

The small-q5_1 model.

§

SmallQ8_0

The small-q8_0 model.

§

SmallEn

The small model with only English support.

§

SmallEnQ5_1

The small-q5_1 model with only English support.

§

SmallEnQ8_0

The small-q8_0 model with only English support.

§

Medium

The medium model.

§

MediumQ5_0

The medium-q5_0 model.

§

MediumQ8_0

The medium-q8_0 model.

§

MediumEn

The medium model with only English support.

§

MediumEnQ5_0

The medium-q5_0 model with only English support.

§

MediumEnQ8_0

The medium-q8_0 model with only English support.

§

Large

The large model.

§

LargeV2

The large model v2.

§

LargeV2Q5_0

§

LargeV2Q8_0

§

LargeV3

The large model v3.

§

LargeV3Q5_0

The large_v3-q5_0 model v3.

§

LargeV3Turbo

The large model v3 turbo.

§

LargeV3TurboQ5_0

The large_v3_turbo-q5_0 model v3 turbo.

§

LargeV3TurboQ8_0

The large_v3_turbo-q8_0 model v3 turbo.

Implementations§

Source§

impl Model

Source

pub fn is_multilingual(&self) -> bool

True if the model supports multiple languages, false otherwise.

Source

pub fn cached(&self) -> bool

Check if the file model has been cached before

Source

pub async fn download_model( &self, force_download: bool, ) -> Result<PathBuf, Error>

Source

pub async fn download_model_listener( &self, force_download: bool, tx: UnboundedSender<Event>, ) -> Result<PathBuf, Error>

Trait Implementations§

Source§

impl Clone for Model

Source§

fn clone(&self) -> Model

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Model

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Model

Source§

fn default() -> Model

Returns the “default value” for a type. Read more
Source§

impl Display for Model

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl FromStr for Model

Source§

type Err = ParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Model, <Self as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl IntoEnumIterator for Model

Source§

type Iterator = ModelIter

Source§

fn iter() -> ModelIter

Source§

impl TryFrom<&str> for Model

Source§

type Error = ParseError

The type returned in the event of a conversion error.
Source§

fn try_from(s: &str) -> Result<Model, <Self as TryFrom<&str>>::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl Freeze for Model

§

impl RefUnwindSafe for Model

§

impl Send for Model

§

impl Sync for Model

§

impl Unpin for Model

§

impl UnwindSafe for Model

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
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,