pub struct KnowledgeCreateRequest { /* private fields */ }Expand description
Implementations§
Source§impl KnowledgeCreateRequest
impl KnowledgeCreateRequest
Sourcepub fn new(embedding_id: EmbeddingId, name: impl Into<String>) -> Self
pub fn new(embedding_id: EmbeddingId, name: impl Into<String>) -> Self
Build a create request with required fields
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Set the knowledge-base description.
Sourcepub fn with_background(self, bg: BackgroundColor) -> Self
pub fn with_background(self, bg: BackgroundColor) -> Self
Set the background color.
Sourcepub fn with_icon(self, icon: KnowledgeIcon) -> Self
pub fn with_icon(self, icon: KnowledgeIcon) -> Self
Set the icon.
Sourcepub fn with_embedding_model(self, model: impl Into<String>) -> Self
pub fn with_embedding_model(self, model: impl Into<String>) -> Self
Set the embedding model name. It must match the configured
EmbeddingId; Self::send_via validates the pair locally.
Sourcepub fn with_contextual(self, contextual: u8) -> Self
pub fn with_contextual(self, contextual: u8) -> Self
Set the contextual-retrieval flag (0 or 1).
Self::send_via rejects values other than 0 and 1.
Auto Trait Implementations§
impl Freeze for KnowledgeCreateRequest
impl RefUnwindSafe for KnowledgeCreateRequest
impl Send for KnowledgeCreateRequest
impl Sync for KnowledgeCreateRequest
impl Unpin for KnowledgeCreateRequest
impl UnsafeUnpin for KnowledgeCreateRequest
impl UnwindSafe for KnowledgeCreateRequest
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