pub struct AnswerConfig {
pub query: String,
pub interaction_id: Option<String>,
pub visitor_id: Option<String>,
pub session_id: Option<String>,
pub messages: Option<Vec<Message>>,
pub related: Option<RelatedQuestionsConfig>,
pub datasource_ids: Option<Vec<String>>,
pub min_similarity: Option<f64>,
pub max_documents: Option<u32>,
pub ragat_notation: Option<String>,
pub llm_config: Option<LlmConfig>,
}Expand description
Answer configuration for AI requests
Fields§
§query: String§interaction_id: Option<String>§visitor_id: Option<String>§session_id: Option<String>§messages: Option<Vec<Message>>§datasource_ids: Option<Vec<String>>§min_similarity: Option<f64>§max_documents: Option<u32>§ragat_notation: Option<String>§llm_config: Option<LlmConfig>Implementations§
Source§impl AnswerConfig
impl AnswerConfig
Sourcepub fn with_interaction_id<S: Into<String>>(self, id: S) -> Self
pub fn with_interaction_id<S: Into<String>>(self, id: S) -> Self
Set interaction ID
Sourcepub fn with_visitor_id<S: Into<String>>(self, id: S) -> Self
pub fn with_visitor_id<S: Into<String>>(self, id: S) -> Self
Set visitor ID
Sourcepub fn with_session_id<S: Into<String>>(self, id: S) -> Self
pub fn with_session_id<S: Into<String>>(self, id: S) -> Self
Set session ID
Sourcepub fn with_messages(self, messages: Vec<Message>) -> Self
pub fn with_messages(self, messages: Vec<Message>) -> Self
Set messages
Set related questions config
Sourcepub fn with_datasource_ids(self, ids: Vec<String>) -> Self
pub fn with_datasource_ids(self, ids: Vec<String>) -> Self
Set datasource IDs
Sourcepub fn with_min_similarity(self, similarity: f64) -> Self
pub fn with_min_similarity(self, similarity: f64) -> Self
Set minimum similarity
Sourcepub fn with_max_documents(self, max_docs: u32) -> Self
pub fn with_max_documents(self, max_docs: u32) -> Self
Set maximum documents
Sourcepub fn with_ragat_notation<S: Into<String>>(self, notation: S) -> Self
pub fn with_ragat_notation<S: Into<String>>(self, notation: S) -> Self
Set RAGAT notation
Sourcepub fn with_llm_config(self, config: LlmConfig) -> Self
pub fn with_llm_config(self, config: LlmConfig) -> Self
Set LLM configuration
Trait Implementations§
Source§impl Clone for AnswerConfig
impl Clone for AnswerConfig
Source§fn clone(&self) -> AnswerConfig
fn clone(&self) -> AnswerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AnswerConfig
impl Debug for AnswerConfig
Auto Trait Implementations§
impl Freeze for AnswerConfig
impl RefUnwindSafe for AnswerConfig
impl Send for AnswerConfig
impl Sync for AnswerConfig
impl Unpin for AnswerConfig
impl UnsafeUnpin for AnswerConfig
impl UnwindSafe for AnswerConfig
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