pub struct OpenAiCompatibleConfig {Show 13 fields
pub base_url: String,
pub api_key: Option<ApiKey>,
pub location: Option<ExecutionLocation>,
pub capabilities: GenerationCapabilities,
pub stream_usage: bool,
pub connect_timeout: Duration,
pub request_timeout: Duration,
pub stream_idle_timeout: Duration,
pub max_output_bytes: usize,
pub max_response_bytes: usize,
pub max_event_bytes: usize,
pub max_tool_calls: usize,
pub stream_buffer: usize,
}Fields§
§base_url: StringBase URL including the API prefix, e.g. http://127.0.0.1:11434/v1.
api_key: Option<ApiKey>§location: Option<ExecutionLocation>Explicit local/remote classification. When None, loopback hosts are
reported as local and everything else as remote (flagged as inferred).
capabilities: GenerationCapabilities§stream_usage: boolAsk streaming servers to include token usage in the final chunk.
connect_timeout: Duration§request_timeout: DurationBound on time-to-response-headers for streams and on the whole operation for non-streaming requests and model listing.
stream_idle_timeout: DurationMaximum silence between stream chunks.
max_output_bytes: usize§max_response_bytes: usize§max_event_bytes: usize§max_tool_calls: usizeMaximum tool calls accepted in one response.
stream_buffer: usizeBounded channel depth between the network task and the consumer.
Implementations§
Source§impl OpenAiCompatibleConfig
impl OpenAiCompatibleConfig
pub fn new(base_url: impl Into<String>) -> OpenAiCompatibleConfig
pub fn with_api_key(self, key: ApiKey) -> OpenAiCompatibleConfig
Trait Implementations§
Source§impl Clone for OpenAiCompatibleConfig
impl Clone for OpenAiCompatibleConfig
Source§fn clone(&self) -> OpenAiCompatibleConfig
fn clone(&self) -> OpenAiCompatibleConfig
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 moreAuto Trait Implementations§
impl Freeze for OpenAiCompatibleConfig
impl RefUnwindSafe for OpenAiCompatibleConfig
impl Send for OpenAiCompatibleConfig
impl Sync for OpenAiCompatibleConfig
impl Unpin for OpenAiCompatibleConfig
impl UnsafeUnpin for OpenAiCompatibleConfig
impl UnwindSafe for OpenAiCompatibleConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more