pub struct KnowledgeUpdateRequest {
pub key: String,
/* private fields */
}Expand description
Knowledge update request (PUT /llm-application/open/knowledge/{id})
Fields§
§key: StringBearer API key
Implementations§
Source§impl KnowledgeUpdateRequest
impl KnowledgeUpdateRequest
Sourcepub fn new(key: String, id: impl AsRef<str>) -> Self
pub fn new(key: String, id: impl AsRef<str>) -> Self
Build update request targeting a specific id with empty body
Sourcepub fn with_embedding_id(self, id: EmbeddingId) -> Self
pub fn with_embedding_id(self, id: EmbeddingId) -> Self
Setters to update individual fields
pub fn with_name(self, name: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_background(self, bg: BackgroundColor) -> Self
pub fn with_icon(self, icon: KnowledgeIcon) -> Self
pub fn with_callback_url(self, url: impl Into<String>) -> Self
pub fn with_callback_header(self, headers: HashMap<String, String>) -> Self
Sourcepub async fn send(&self) -> Result<KnowledgeUpdateResponse>
pub async fn send(&self) -> Result<KnowledgeUpdateResponse>
Validate and send the update request. Requires at least one field set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KnowledgeUpdateRequest
impl RefUnwindSafe for KnowledgeUpdateRequest
impl Send for KnowledgeUpdateRequest
impl Sync for KnowledgeUpdateRequest
impl Unpin for KnowledgeUpdateRequest
impl UnwindSafe for KnowledgeUpdateRequest
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