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
pub async fn send(&self) -> ZaiResult<KnowledgeUpdateResponse>
pub fn put(&self) -> impl Future<Output = ZaiResult<Response>> + Send
Trait Implementations§
Source§impl HttpClient for KnowledgeUpdateRequest
impl HttpClient for KnowledgeUpdateRequest
type Body = UpdateKnowledgeBody
type ApiUrl = String
type ApiKey = String
fn api_url(&self) -> &Self::ApiUrl
fn api_key(&self) -> &Self::ApiKey
fn body(&self) -> &Self::Body
Source§fn http_config(&self) -> Arc<HttpClientConfig>
fn http_config(&self) -> Arc<HttpClientConfig>
Get HTTP client configuration for this request Read more
Auto Trait Implementations§
impl Freeze for KnowledgeUpdateRequest
impl RefUnwindSafe for KnowledgeUpdateRequest
impl Send for KnowledgeUpdateRequest
impl Sync for KnowledgeUpdateRequest
impl Unpin for KnowledgeUpdateRequest
impl UnsafeUnpin 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