pub struct DeepSeekProvider { /* private fields */ }Expand description
ModelProvider implementation backed by the DeepSeek API.
Implementations§
Source§impl DeepSeekProvider
impl DeepSeekProvider
pub fn new(config: DeepSeekConfig) -> Self
pub async fn complete_with_options( &self, request: CompletionRequest, options: DeepSeekChatOptions, ) -> Result<CompletionResponse, AgentError>
pub fn stream_complete_with_options<'a>( &'a self, request: CompletionRequest, options: DeepSeekChatOptions, ) -> Pin<Box<dyn Stream<Item = Result<ProviderEvent, AgentError>> + Send + 'a>>
pub async fn fim_complete( &self, request: DeepSeekFimRequest, ) -> Result<DeepSeekFimResponse, AgentError>
pub async fn list_models(&self) -> Result<DeepSeekModelList, AgentError>
pub async fn balance(&self) -> Result<DeepSeekBalance, AgentError>
Trait Implementations§
Source§impl ModelProvider for DeepSeekProvider
impl ModelProvider for DeepSeekProvider
Source§fn complete<'life0, 'async_trait>(
&'life0 self,
request: CompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<CompletionResponse, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete<'life0, 'async_trait>(
&'life0 self,
request: CompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<CompletionResponse, AgentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Issue a single non-streaming completion request.
Source§fn stream_complete<'a>(
&'a self,
request: CompletionRequest,
) -> Pin<Box<dyn Stream<Item = Result<ProviderEvent, AgentError>> + Send + 'a>>
fn stream_complete<'a>( &'a self, request: CompletionRequest, ) -> Pin<Box<dyn Stream<Item = Result<ProviderEvent, AgentError>> + Send + 'a>>
Stream a completion as a sequence of
ProviderEvents. Read moreSource§fn max_tokens(&self) -> u32
fn max_tokens(&self) -> u32
Return the maximum number of tokens that can be requested from this provider. Read more
Auto Trait Implementations§
impl Freeze for DeepSeekProvider
impl !RefUnwindSafe for DeepSeekProvider
impl Send for DeepSeekProvider
impl Sync for DeepSeekProvider
impl Unpin for DeepSeekProvider
impl UnsafeUnpin for DeepSeekProvider
impl !UnwindSafe for DeepSeekProvider
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