pub enum Commands {
Show 13 variants
Model {
action: ModelCommands,
},
Generate {Show 13 fields
prompt: Option<String>,
model: String,
model_path: Option<String>,
max_tokens: usize,
temperature: f32,
top_k: Option<usize>,
top_p: Option<f32>,
min_p: Option<f32>,
repetition_penalty: f32,
greedy: bool,
gpu: bool,
no_stream: bool,
quiet: bool,
},
Summarize {
input: Option<String>,
model: String,
model_path: Option<String>,
min_length: Option<usize>,
max_length: Option<usize>,
num_beams: Option<usize>,
length_penalty: Option<f32>,
no_repeat_ngram: Option<usize>,
greedy: bool,
no_stream: bool,
gpu: bool,
quiet: bool,
},
Translate {Show 13 fields
input: Option<String>,
model: String,
model_path: Option<String>,
src: Option<String>,
dst: Option<String>,
max_length: Option<usize>,
num_beams: Option<usize>,
length_penalty: Option<f32>,
no_repeat_ngram: Option<usize>,
greedy: bool,
no_stream: bool,
gpu: bool,
quiet: bool,
},
Inspect {
path: String,
},
Embed {
input: Option<String>,
model: String,
model_path: Option<String>,
format: String,
normalize: bool,
pooling: String,
gpu: bool,
quiet: bool,
},
Transcribe {
file: String,
model: String,
model_path: Option<String>,
language: Option<String>,
translate: bool,
timestamps: bool,
max_tokens: Option<usize>,
no_stream: bool,
gpu: bool,
quiet: bool,
},
Classify {Show 13 fields
input: Vec<String>,
model: String,
model_path: Option<String>,
labels: Option<String>,
top_k: usize,
threshold: Option<f32>,
max_length: Option<usize>,
batch_size: Option<usize>,
multi_label: bool,
format: String,
gpu: bool,
dtype: Option<String>,
quiet: bool,
},
Rerank {
query: String,
documents: Vec<String>,
model: String,
model_path: Option<String>,
top_k: Option<usize>,
format: String,
gpu: bool,
quiet: bool,
},
Chat {
model: String,
model_path: Option<String>,
system: Option<String>,
temperature: f32,
max_tokens: usize,
gpu: bool,
quiet: bool,
},
Index {
action: IndexCommands,
},
Search {
index_path: String,
query: String,
top_k: usize,
mode: String,
model: String,
rerank_model: Option<String>,
format: String,
gpu: bool,
quiet: bool,
},
Similarity {
text1: String,
text2: String,
model: String,
gpu: bool,
quiet: bool,
},
}Variants§
Model
Manage models (list, download, info)
Fields
§
action: ModelCommandsGenerate
Generate text from a prompt
Fields
Summarize
Summarize text
Fields
Translate
Translate text between languages
Fields
Inspect
Show a model’s metadata, config and tensor layout
Embed
Generate embeddings for text
Fields
§
pooling: StringPooling strategy: mean, cls, max
Mean matches what sentence-transformers does for these models, and what the library bindings and presets already default to. Pooling changes the vector itself, so a different choice here does not produce a slightly different answer, it produces one that cannot be compared against the others.
Transcribe
Transcribe audio to text
Fields
Classify
Classify text using a classification model
Fields
Rerank
Rerank documents by relevance to a query
Fields
Chat
Interactive chat mode
Fields
Index
Create or manage search indexes
Fields
§
action: IndexCommandsSearch
Search an index
Fields
Similarity
Compute similarity between two texts
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.impl StructuralPartialEq for Commands
Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Commands
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnsafeUnpin for Commands
impl UnwindSafe for Commands
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> 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