pub struct OpenAiCompatibleProvider { /* private fields */ }Expand description
Reference LlmProvider backed by an OpenAI-compatible HTTP endpoint.
Concretely this is what mailrs uses against its self-hosted qwen3.5-9b
server — but any service that accepts the same POST {system, messages, temperature} shape works. The embedding endpoint is derived by
substituting /complete → /embed in the URL.
Implementations§
Source§impl OpenAiCompatibleProvider
impl OpenAiCompatibleProvider
Trait Implementations§
Source§impl Clone for OpenAiCompatibleProvider
impl Clone for OpenAiCompatibleProvider
Source§fn clone(&self) -> OpenAiCompatibleProvider
fn clone(&self) -> OpenAiCompatibleProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OpenAiCompatibleProvider
impl Debug for OpenAiCompatibleProvider
Source§impl LlmProvider for OpenAiCompatibleProvider
impl LlmProvider for OpenAiCompatibleProvider
Source§fn complete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
system: &'life1 str,
user_message: &'life2 str,
temperature: f32,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn complete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
system: &'life1 str,
user_message: &'life2 str,
temperature: f32,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Run a chat completion against the model. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for OpenAiCompatibleProvider
impl !UnwindSafe for OpenAiCompatibleProvider
impl Freeze for OpenAiCompatibleProvider
impl Send for OpenAiCompatibleProvider
impl Sync for OpenAiCompatibleProvider
impl Unpin for OpenAiCompatibleProvider
impl UnsafeUnpin for OpenAiCompatibleProvider
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