pub struct DeepSeekClient<H: HttpClient> {
pub http: H,
pub api_key: String,
pub base_url: String,
}Expand description
Generic DeepSeek client over any transport.
Fields§
§http: H§api_key: String§base_url: StringImplementations§
Source§impl<H: HttpClient> DeepSeekClient<H>
impl<H: HttpClient> DeepSeekClient<H>
pub fn new(http: H, api_key: impl Into<String>) -> Self
pub fn with_base_url(self, url: impl Into<String>) -> Self
Sourcepub async fn chat(&self, request: &ChatRequest) -> Result<ChatResponse>
pub async fn chat(&self, request: &ChatRequest) -> Result<ChatResponse>
Send a chat completion request.
Trait Implementations§
Source§impl<H: HttpClient + Clone> Clone for DeepSeekClient<H>
impl<H: HttpClient + Clone> Clone for DeepSeekClient<H>
Auto Trait Implementations§
impl<H> Freeze for DeepSeekClient<H>where
H: Freeze,
impl<H> RefUnwindSafe for DeepSeekClient<H>where
H: RefUnwindSafe,
impl<H> Send for DeepSeekClient<H>where
H: Send,
impl<H> Sync for DeepSeekClient<H>where
H: Sync,
impl<H> Unpin for DeepSeekClient<H>where
H: Unpin,
impl<H> UnsafeUnpin for DeepSeekClient<H>where
H: UnsafeUnpin,
impl<H> UnwindSafe for DeepSeekClient<H>where
H: UnwindSafe,
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