1use crate::embed::output::{ExtractorMode, OutputId};
4
5pub struct Parameters {
9 max_length: Option<usize>,
10 sigmoid: bool,
11 output_id: OutputId,
12 mode: ExtractorMode,
13}
14
15impl Parameters {
16
17 pub fn with_max_length(mut self, max_length: Option<usize>) -> Self {
19 self.max_length = max_length;
20 self
21 }
22
23 pub fn max_length(&self) -> Option<usize> {
25 self.max_length
26 }
27
28 pub fn with_sigmoid(mut self, sigmoid: bool) -> Self {
30 self.sigmoid = sigmoid;
31 self
32 }
33
34 pub fn sigmoid(&self) -> bool {
36 self.sigmoid
37 }
38
39 pub fn with_output_id(mut self, id: &str) -> Self {
41 self.output_id = id.into();
42 self
43 }
44
45 pub fn output_id(&self) -> &OutputId {
47 &self.output_id
48 }
49
50 pub fn with_mode(mut self, mode: ExtractorMode) -> Self {
52 self.mode = mode;
53 self
54 }
55
56 pub fn mode(&self) -> ExtractorMode {
58 self.mode
59 }
60
61}
62
63
64impl Default for Parameters {
65 fn default() -> Self {
66 Self {
67 max_length: None,
68 sigmoid: false,
69 output_id: OutputId::default(),
70 mode: ExtractorMode::default(),
71 }
72 }
73}