pub struct OpenAiCompatibleClient { /* private fields */ }Expand description
Client for OpenAI-compatible APIs (OpenAI, DeepSeek)
Implementations§
Source§impl OpenAiCompatibleClient
impl OpenAiCompatibleClient
Sourcepub fn new(provider: Provider, api_key: String) -> Self
pub fn new(provider: Provider, api_key: String) -> Self
Create a new client for the specified provider
Sourcepub fn with_base_url(
provider: Provider,
api_key: String,
base_url: String,
) -> Self
pub fn with_base_url( provider: Provider, api_key: String, base_url: String, ) -> Self
Create client with custom base URL (useful for testing or custom endpoints)
Sourcepub fn with_model(self, model: impl Into<String>) -> Self
pub fn with_model(self, model: impl Into<String>) -> Self
Set custom model
Trait Implementations§
Source§impl Clone for OpenAiCompatibleClient
impl Clone for OpenAiCompatibleClient
Source§fn clone(&self) -> OpenAiCompatibleClient
fn clone(&self) -> OpenAiCompatibleClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OpenAiCompatibleClient
impl Debug for OpenAiCompatibleClient
Source§impl LlmClient for OpenAiCompatibleClient
impl LlmClient for OpenAiCompatibleClient
Source§fn generate_commit_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
diff: &'life1 str,
template: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<(String, String)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn generate_commit_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
diff: &'life1 str,
template: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<(String, String)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Generate a commit message from a git diff Read more
Source§fn provider_name(&self) -> &str
fn provider_name(&self) -> &str
Get the provider name for display
Auto Trait Implementations§
impl Freeze for OpenAiCompatibleClient
impl !RefUnwindSafe for OpenAiCompatibleClient
impl Send for OpenAiCompatibleClient
impl Sync for OpenAiCompatibleClient
impl Unpin for OpenAiCompatibleClient
impl !UnwindSafe for OpenAiCompatibleClient
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