#[non_exhaustive]pub struct GenerativeQuestionConfig {
pub catalog: String,
pub facet: String,
pub generated_question: String,
pub final_question: String,
pub example_values: Vec<String>,
pub frequency: f32,
pub allowed_in_conversation: bool,
/* private fields */
}Expand description
Configuration for a single generated question.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.catalog: StringRequired. Resource name of the catalog. Format: projects/{project}/locations/{location}/catalogs/{catalog}
facet: StringRequired. The facet to which the question is associated.
generated_question: StringOutput only. The LLM generated question.
final_question: StringOptional. The question that will be used at serving time. Question can have a max length of 300 bytes. When not populated, generated_question should be used.
example_values: Vec<String>Output only. Values that can be used to answer the question.
frequency: f32Output only. The ratio of how often a question was asked.
allowed_in_conversation: boolOptional. Whether the question is asked at serving time.
Implementations§
Source§impl GenerativeQuestionConfig
impl GenerativeQuestionConfig
pub fn new() -> Self
Sourcepub fn set_catalog<T: Into<String>>(self, v: T) -> Self
pub fn set_catalog<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_generated_question<T: Into<String>>(self, v: T) -> Self
pub fn set_generated_question<T: Into<String>>(self, v: T) -> Self
Sets the value of generated_question.
§Example
ⓘ
let x = GenerativeQuestionConfig::new().set_generated_question("example");Sourcepub fn set_final_question<T: Into<String>>(self, v: T) -> Self
pub fn set_final_question<T: Into<String>>(self, v: T) -> Self
Sets the value of final_question.
§Example
ⓘ
let x = GenerativeQuestionConfig::new().set_final_question("example");Sourcepub fn set_example_values<T, V>(self, v: T) -> Self
pub fn set_example_values<T, V>(self, v: T) -> Self
Sets the value of example_values.
§Example
ⓘ
let x = GenerativeQuestionConfig::new().set_example_values(["a", "b", "c"]);Sourcepub fn set_frequency<T: Into<f32>>(self, v: T) -> Self
pub fn set_frequency<T: Into<f32>>(self, v: T) -> Self
Sourcepub fn set_allowed_in_conversation<T: Into<bool>>(self, v: T) -> Self
pub fn set_allowed_in_conversation<T: Into<bool>>(self, v: T) -> Self
Sets the value of allowed_in_conversation.
§Example
ⓘ
let x = GenerativeQuestionConfig::new().set_allowed_in_conversation(true);Trait Implementations§
Source§impl Clone for GenerativeQuestionConfig
impl Clone for GenerativeQuestionConfig
Source§fn clone(&self) -> GenerativeQuestionConfig
fn clone(&self) -> GenerativeQuestionConfig
Returns a duplicate 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 GenerativeQuestionConfig
impl Debug for GenerativeQuestionConfig
Source§impl Default for GenerativeQuestionConfig
impl Default for GenerativeQuestionConfig
Source§fn default() -> GenerativeQuestionConfig
fn default() -> GenerativeQuestionConfig
Returns the “default value” for a type. Read more
Source§impl Message for GenerativeQuestionConfig
impl Message for GenerativeQuestionConfig
Source§impl PartialEq for GenerativeQuestionConfig
impl PartialEq for GenerativeQuestionConfig
impl StructuralPartialEq for GenerativeQuestionConfig
Auto Trait Implementations§
impl Freeze for GenerativeQuestionConfig
impl RefUnwindSafe for GenerativeQuestionConfig
impl Send for GenerativeQuestionConfig
impl Sync for GenerativeQuestionConfig
impl Unpin for GenerativeQuestionConfig
impl UnwindSafe for GenerativeQuestionConfig
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