pub struct KnowledgeListRequest {
pub key: String,
/* private fields */
}Expand description
Knowledge list request (GET /llm-application/open/knowledge)
Fields§
§key: StringBearer API key
Implementations§
Source§impl KnowledgeListRequest
impl KnowledgeListRequest
pub fn new(key: String) -> Self
pub fn with_base_url(self, base: impl Into<String>) -> Self
pub fn with_endpoint_config(self, endpoint_config: EndpointConfig) -> Self
pub fn with_http_config(self, config: HttpClientConfig) -> Self
Sourcepub fn with_query(self, q: KnowledgeListQuery) -> Self
pub fn with_query(self, q: KnowledgeListQuery) -> Self
Apply query by rebuilding internal URL
Sourcepub async fn send(&self) -> ZaiResult<KnowledgeListResponse>
pub async fn send(&self) -> ZaiResult<KnowledgeListResponse>
Send request and parse typed response
Sourcepub async fn send_with_query(
self,
q: &KnowledgeListQuery,
) -> ZaiResult<KnowledgeListResponse>
pub async fn send_with_query( self, q: &KnowledgeListQuery, ) -> ZaiResult<KnowledgeListResponse>
Validate query, rebuild URL then send
Trait Implementations§
Source§impl HttpClient for KnowledgeListRequest
impl HttpClient for KnowledgeListRequest
type Body = ()
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
Source§fn post(&self) -> impl Future<Output = ZaiResult<Response>> + Send
fn post(&self) -> impl Future<Output = ZaiResult<Response>> + Send
Sends a POST request to the API endpoint. Read more
Source§fn get(&self) -> impl Future<Output = ZaiResult<Response>> + Send
fn get(&self) -> impl Future<Output = ZaiResult<Response>> + Send
Sends a GET request to the API endpoint. Read more
Auto Trait Implementations§
impl Freeze for KnowledgeListRequest
impl RefUnwindSafe for KnowledgeListRequest
impl Send for KnowledgeListRequest
impl Sync for KnowledgeListRequest
impl Unpin for KnowledgeListRequest
impl UnsafeUnpin for KnowledgeListRequest
impl UnwindSafe for KnowledgeListRequest
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