pub struct AzureOpenAIClient { /* private fields */ }Expand description
Azure OpenAI client implementation
Implementations§
Source§impl AzureOpenAIClient
impl AzureOpenAIClient
Sourcepub fn new_with_all(
api_key: String,
model: String,
base_url: String,
api_version: String,
temperature: f32,
max_tokens: u32,
retry_attempts: u32,
retry_delay_ms: u64,
request_timeout_seconds: u64,
) -> Self
pub fn new_with_all( api_key: String, model: String, base_url: String, api_version: String, temperature: f32, max_tokens: u32, retry_attempts: u32, retry_delay_ms: u64, request_timeout_seconds: u64, ) -> Self
Create a new AzureOpenAIClient with full configuration
Sourcepub fn from_config(config: &AIConfig) -> Result<Self>
pub fn from_config(config: &AIConfig) -> Result<Self>
Create client from AIConfig
Trait Implementations§
Source§impl AIProvider for AzureOpenAIClient
impl AIProvider for AzureOpenAIClient
Source§fn analyze_content<'life0, 'async_trait>(
&'life0 self,
request: AnalysisRequest,
) -> Pin<Box<dyn Future<Output = Result<MatchResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn analyze_content<'life0, 'async_trait>(
&'life0 self,
request: AnalysisRequest,
) -> Pin<Box<dyn Future<Output = Result<MatchResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Analyze multimedia files and subtitle files for matching results. Read more
Source§fn verify_match<'life0, 'async_trait>(
&'life0 self,
verification: VerificationRequest,
) -> Pin<Box<dyn Future<Output = Result<ConfidenceScore>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn verify_match<'life0, 'async_trait>(
&'life0 self,
verification: VerificationRequest,
) -> Pin<Box<dyn Future<Output = Result<ConfidenceScore>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Verify file matching confidence. Read more
Source§impl Debug for AzureOpenAIClient
impl Debug for AzureOpenAIClient
Source§impl HttpRetryClient for AzureOpenAIClient
impl HttpRetryClient for AzureOpenAIClient
Source§fn retry_attempts(&self) -> u32
fn retry_attempts(&self) -> u32
Number of retry attempts.
Source§fn retry_delay_ms(&self) -> u64
fn retry_delay_ms(&self) -> u64
Delay between retries in milliseconds.
Source§async fn make_request_with_retry(
&self,
request: RequestBuilder,
) -> Result<Response>
async fn make_request_with_retry( &self, request: RequestBuilder, ) -> Result<Response>
Make an HTTP request with retry logic.
Source§impl PromptBuilder for AzureOpenAIClient
impl PromptBuilder for AzureOpenAIClient
Source§fn build_analysis_prompt(&self, request: &AnalysisRequest) -> String
fn build_analysis_prompt(&self, request: &AnalysisRequest) -> String
Build analysis prompt.
Source§fn build_verification_prompt(&self, request: &VerificationRequest) -> String
fn build_verification_prompt(&self, request: &VerificationRequest) -> String
Build verification prompt.
Source§fn get_analysis_system_message() -> &'static str
fn get_analysis_system_message() -> &'static str
System message for analysis prompt.
Source§fn get_verification_system_message() -> &'static str
fn get_verification_system_message() -> &'static str
System message for verification prompt.
Source§impl ResponseParser for AzureOpenAIClient
impl ResponseParser for AzureOpenAIClient
Source§fn parse_match_result(&self, response: &str) -> Result<MatchResult>
fn parse_match_result(&self, response: &str) -> Result<MatchResult>
Parse match result.
Source§fn parse_confidence_score(&self, response: &str) -> Result<ConfidenceScore>
fn parse_confidence_score(&self, response: &str) -> Result<ConfidenceScore>
Parse confidence score.
Auto Trait Implementations§
impl Freeze for AzureOpenAIClient
impl !RefUnwindSafe for AzureOpenAIClient
impl Send for AzureOpenAIClient
impl Sync for AzureOpenAIClient
impl Unpin for AzureOpenAIClient
impl !UnwindSafe for AzureOpenAIClient
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