pub struct DockerRunnerClient { /* private fields */ }Expand description
Docker Model Runner API client
Implementations§
Source§impl DockerRunnerClient
impl DockerRunnerClient
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Create a new DockerRunnerClient from environment variables.
Reads DOCKER_RUNNER_BASE_URL (default “http://localhost:5000/v1”) and
DOCKER_RUNNER_API_KEY (optional).
Sourcepub fn with_api_key(self, api_key: impl Into<String>) -> Self
pub fn with_api_key(self, api_key: impl Into<String>) -> Self
Create a new Docker Runner client with API key
Sourcepub fn with_base_url(self, url: impl Into<String>) -> Self
pub fn with_base_url(self, url: impl Into<String>) -> Self
Create with custom base URL
Trait Implementations§
Source§impl Debug for DockerRunnerClient
impl Debug for DockerRunnerClient
Source§impl Default for DockerRunnerClient
impl Default for DockerRunnerClient
Source§impl Provider for DockerRunnerClient
impl Provider for DockerRunnerClient
Source§fn chat_completion<'life0, 'async_trait>(
&'life0 self,
request: ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatCompletionResponse, LlmError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn chat_completion<'life0, 'async_trait>(
&'life0 self,
request: ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatCompletionResponse, LlmError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Generate a chat completion
Source§fn embeddings<'life0, 'async_trait>(
&'life0 self,
request: EmbeddingRequest,
) -> Pin<Box<dyn Future<Output = Result<EmbeddingResponse, LlmError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn embeddings<'life0, 'async_trait>(
&'life0 self,
request: EmbeddingRequest,
) -> Pin<Box<dyn Future<Output = Result<EmbeddingResponse, LlmError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Generate embeddings for text
Source§fn provider_name(&self) -> &'static str
fn provider_name(&self) -> &'static str
Get the provider name
Source§fn chat_completion_stream(
&self,
_request: ChatCompletionRequest,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<ChatCompletionChunk, LlmError>> + Send>>, LlmError>> + Send + '_>>
fn chat_completion_stream( &self, _request: ChatCompletionRequest, ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<ChatCompletionChunk, LlmError>> + Send>>, LlmError>> + Send + '_>>
Stream a chat completion
Source§fn supported_models(&self) -> Vec<String>
fn supported_models(&self) -> Vec<String>
Get the list of models supported by this provider
Auto Trait Implementations§
impl Freeze for DockerRunnerClient
impl !RefUnwindSafe for DockerRunnerClient
impl Send for DockerRunnerClient
impl Sync for DockerRunnerClient
impl Unpin for DockerRunnerClient
impl UnsafeUnpin for DockerRunnerClient
impl !UnwindSafe for DockerRunnerClient
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