pub enum FileSource {
HuggingFace {
model_id: String,
revision: String,
file: String,
},
Local(PathBuf),
}
Expand description
A source for a file, either from Hugging Face or a local path
Variants§
Implementations§
Source§impl FileSource
impl FileSource
Sourcepub fn huggingface(
model_id: impl ToString,
revision: impl ToString,
file: impl ToString,
) -> FileSource
pub fn huggingface( model_id: impl ToString, revision: impl ToString, file: impl ToString, ) -> FileSource
Create a new source for a file from Hugging Face
Sourcepub fn local(path: PathBuf) -> FileSource
pub fn local(path: PathBuf) -> FileSource
Create a new source for a local file
Trait Implementations§
Source§impl Clone for FileSource
impl Clone for FileSource
Source§fn clone(&self) -> FileSource
fn clone(&self) -> FileSource
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FileSource
impl Debug for FileSource
Auto Trait Implementations§
impl Freeze for FileSource
impl RefUnwindSafe for FileSource
impl Send for FileSource
impl Sync for FileSource
impl Unpin for FileSource
impl UnwindSafe for FileSource
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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<S> IntoChatMessage for Swhere
S: ToString,
impl<S> IntoChatMessage for Swhere
S: ToString,
Source§fn into_chat_message(self) -> ChatMessage
fn into_chat_message(self) -> ChatMessage
Convert the type into a chat message.
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