ChatLawProvider

Struct ChatLawProvider 

Source
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

Source

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

Source

pub fn from_env() -> Result<Self>

Create a new ChatLAW provider from environment.

Source

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Provider for ChatLawProvider

Source§

fn name(&self) -> &str

Returns the provider’s name (e.g., “anthropic”, “openai”).
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,

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,

Make a streaming completion request. Read more
Source§

fn supports_tools(&self) -> bool

Check if this provider supports tool/function calling.
Source§

fn supports_vision(&self) -> bool

Check if this provider supports vision (image input).
Source§

fn supports_streaming(&self) -> bool

Check if this provider supports streaming.
Source§

fn supported_models(&self) -> Option<&[&str]>

Get the list of models supported by this provider. Read more
Source§

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,

Count tokens in a request. Read more
Source§

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,

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,

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,

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,

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,

List recent batch jobs.
Source§

fn supports_batch(&self) -> bool

Check if this provider supports batch processing.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<P> ProviderExt for P
where P: Provider,

Source§

fn with_retry(self) -> RetryingProvider<Self>

Wrap this provider with default retry logic.
Source§

fn with_retry_config(self, config: RetryConfig) -> RetryingProvider<Self>

Wrap this provider with custom retry configuration.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more