pub struct LlmClient {
pub model_id: String,
/* private fields */
}Fields§
§model_id: StringImplementations§
Source§impl LlmClient
impl LlmClient
pub fn new(full_model_string: &str) -> Result<Self, AicoError>
pub fn get_extra_params(&self) -> Option<Value>
Sourcepub async fn stream_chat(
&self,
req: ChatCompletionRequest,
) -> Result<Response, AicoError>
pub async fn stream_chat( &self, req: ChatCompletionRequest, ) -> Result<Response, AicoError>
Sends a streaming request and returns a channel or iterator of chunks. For simplicity with ‘minimal deps’, we return the response and let the caller iterate.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LlmClient
impl !RefUnwindSafe for LlmClient
impl Send for LlmClient
impl Sync for LlmClient
impl Unpin for LlmClient
impl !UnwindSafe for LlmClient
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