pub struct CreateKnowledgeRequest {
pub key: String,
/* private fields */
}Expand description
Create knowledge request (POST /llm-application/open/knowledge)
Fields§
§key: StringBearer key
Implementations§
Source§impl CreateKnowledgeRequest
impl CreateKnowledgeRequest
Sourcepub fn new(
key: String,
embedding_id: EmbeddingId,
name: impl Into<String>,
) -> Self
pub fn new( key: String, 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
Optional fields setters
pub fn with_background(self, bg: BackgroundColor) -> Self
pub fn with_icon(self, icon: KnowledgeIcon) -> Self
Sourcepub async fn send(&self) -> Result<CreateKnowledgeResponse>
pub async fn send(&self) -> Result<CreateKnowledgeResponse>
Validate and send, returning typed response
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CreateKnowledgeRequest
impl RefUnwindSafe for CreateKnowledgeRequest
impl Send for CreateKnowledgeRequest
impl Sync for CreateKnowledgeRequest
impl Unpin for CreateKnowledgeRequest
impl UnwindSafe for CreateKnowledgeRequest
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