pub struct OpenAiCompatibleClient { /* private fields */ }Expand description
OpenAI-compatible client for self-hosted servers.
Implementations§
Trait Implementations§
Source§impl LlmClient for OpenAiCompatibleClient
impl LlmClient for OpenAiCompatibleClient
Source§fn stream<'a>(
&'a self,
request: &'a LlmRequest,
) -> Pin<Box<dyn Stream<Item = Result<LlmEvent, LlmError>> + Send + 'a>>
fn stream<'a>( &'a self, request: &'a LlmRequest, ) -> Pin<Box<dyn Stream<Item = Result<LlmEvent, LlmError>> + Send + 'a>>
Stream a completion request Read more
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), LlmError>> + Send + 'async_trait>>where
'life0: 'async_trait,
OpenAiCompatibleClient: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), LlmError>> + Send + 'async_trait>>where
'life0: 'async_trait,
OpenAiCompatibleClient: 'async_trait,
Check if the client is healthy/connected
Source§fn compile_schema(
&self,
output_schema: &OutputSchema,
) -> Result<CompiledSchema, SchemaError>
fn compile_schema( &self, output_schema: &OutputSchema, ) -> Result<CompiledSchema, SchemaError>
Compile an output schema for this provider. Read more
Auto Trait Implementations§
impl Freeze for OpenAiCompatibleClient
impl !RefUnwindSafe for OpenAiCompatibleClient
impl Send for OpenAiCompatibleClient
impl Sync for OpenAiCompatibleClient
impl Unpin for OpenAiCompatibleClient
impl UnsafeUnpin 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