gliclass/params.rs
1//! GLiClass Parameters
2
3/// Parameters for the GLiClass pipeline.
4pub struct Parameters {
5 prompt_first: bool,
6}
7
8impl Parameters {
9 /// This parameter must be set according to the expectations of the loaded model.
10 ///
11 /// Examples:
12 /// * `gliclass-xxx-1.0` => `false`
13 /// * `gliclass-modern-base-v2.0-xxx` => `true`
14 /// * for other models see the accompanying `config.json` file
15 pub fn with_prompt_first(mut self, b: bool) -> Self {
16 self.prompt_first = b;
17 self
18 }
19
20 pub fn prompt_first(&self) -> bool {
21 self.prompt_first
22 }
23}
24
25impl Default for Parameters {
26 fn default() -> Self {
27 Self {
28 prompt_first: false
29 }
30 }
31}
32