pub struct ChatLawProvider { /* private fields */ }Expand description
ChatLAW legal AI provider.
Specialized LLM for legal domain applications:
- Contract analysis and summarization
- Legal document classification
- Case law research and citation
- Regulatory compliance checking
- Legal document generation
Implementations§
Source§impl ChatLawProvider
impl ChatLawProvider
Sourcepub fn new(_config: ProviderConfig) -> Result<Self>
pub fn new(_config: ProviderConfig) -> Result<Self>
Create a new ChatLAW provider.
§Note
This provider requires API access partnership with ChatLAW. Contact ChatLAW via chatlaw.ai
Sourcepub fn with_api_key(_api_key: impl Into<String>) -> Result<Self>
pub fn with_api_key(_api_key: impl Into<String>) -> Result<Self>
Create a new ChatLAW provider with an API key.
Trait Implementations§
Source§impl Debug for ChatLawProvider
impl Debug for ChatLawProvider
Source§impl Provider for ChatLawProvider
impl Provider for ChatLawProvider
Source§fn complete<'life0, 'async_trait>(
&'life0 self,
_request: CompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<CompletionResponse>> + 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>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Make a completion request. Read more
Source§fn complete_stream<'life0, 'async_trait>(
&'life0 self,
_request: CompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<StreamChunk>> + Send>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete_stream<'life0, 'async_trait>(
&'life0 self,
_request: CompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<StreamChunk>> + Send>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Make a streaming completion request. Read more
Source§fn supports_tools(&self) -> bool
fn supports_tools(&self) -> bool
Check if this provider supports tool/function calling.
Source§fn supports_vision(&self) -> bool
fn supports_vision(&self) -> bool
Check if this provider supports vision (image input).
Source§fn supports_streaming(&self) -> bool
fn supports_streaming(&self) -> bool
Check if this provider supports streaming.
Source§fn supported_models(&self) -> Option<&[&str]>
fn supported_models(&self) -> Option<&[&str]>
Get the list of models supported by this provider. Read more
Source§fn default_model(&self) -> Option<&str>
fn default_model(&self) -> Option<&str>
Get the default model for this provider.
Source§fn count_tokens<'life0, 'async_trait>(
&'life0 self,
_request: TokenCountRequest,
) -> Pin<Box<dyn Future<Output = Result<TokenCountResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_tokens<'life0, 'async_trait>(
&'life0 self,
_request: TokenCountRequest,
) -> Pin<Box<dyn Future<Output = Result<TokenCountResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Count tokens in a request. Read more
Source§fn supports_token_counting(&self) -> bool
fn supports_token_counting(&self) -> bool
Check if this provider supports token counting.
Source§fn create_batch<'life0, 'async_trait>(
&'life0 self,
_requests: Vec<BatchRequest>,
) -> Pin<Box<dyn Future<Output = Result<BatchJob>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_batch<'life0, 'async_trait>(
&'life0 self,
_requests: Vec<BatchRequest>,
) -> Pin<Box<dyn Future<Output = Result<BatchJob>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a batch of requests for asynchronous processing. Read more
Source§fn get_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
_batch_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<BatchJob>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
_batch_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<BatchJob>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the status of a batch job.
Source§fn get_batch_results<'life0, 'life1, 'async_trait>(
&'life0 self,
_batch_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<BatchResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_batch_results<'life0, 'life1, 'async_trait>(
&'life0 self,
_batch_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<BatchResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the results of a completed batch.
Source§fn cancel_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
_batch_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<BatchJob>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cancel_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
_batch_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<BatchJob>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Cancel a batch job.
Source§fn list_batches<'life0, 'async_trait>(
&'life0 self,
_limit: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BatchJob>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_batches<'life0, 'async_trait>(
&'life0 self,
_limit: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<Vec<BatchJob>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List recent batch jobs.
Source§fn supports_batch(&self) -> bool
fn supports_batch(&self) -> bool
Check if this provider supports batch processing.
Auto Trait Implementations§
impl Freeze for ChatLawProvider
impl RefUnwindSafe for ChatLawProvider
impl Send for ChatLawProvider
impl Sync for ChatLawProvider
impl Unpin for ChatLawProvider
impl UnwindSafe for ChatLawProvider
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<P> ProviderExt for Pwhere
P: Provider,
impl<P> ProviderExt for Pwhere
P: Provider,
Source§fn with_retry(self) -> RetryingProvider<Self>
fn with_retry(self) -> RetryingProvider<Self>
Wrap this provider with default retry logic.
Source§fn with_retry_config(self, config: RetryConfig) -> RetryingProvider<Self>
fn with_retry_config(self, config: RetryConfig) -> RetryingProvider<Self>
Wrap this provider with custom retry configuration.