pub struct BridgeConfig {
pub openai_base: String,
pub native_base: String,
pub upstream_model: String,
pub upstream_key: Option<String>,
pub served_model: String,
pub description: String,
pub release_date: String,
pub chat_template_kwargs: Value,
pub max_input_tokens: Option<usize>,
pub local: LocalComponents,
}Expand description
Everything Bridge::connect needs to reach one upstream model.
Fields§
§openai_base: StringOpenAI-compatible root, for example http://127.0.0.1:8080/v1.
native_base: StringNative root for llama.cpp’s /completion.
upstream_model: StringModel name sent upstream.
upstream_key: Option<String>Bearer token for the upstream service, when it needs one.
served_model: StringModel id this bridge accepts from clients.
description: StringDescription returned by GET /v1/models.
release_date: StringISO release date returned by GET /v1/models.
chat_template_kwargs: ValueTemplate variables, for example {"enable_thinking": false}.
max_input_tokens: Option<usize>Reject rows above this token count instead of truncating them.
local: LocalComponentsRender the chat template and/or tokenize in-process instead of asking the runtime.
Auto Trait Implementations§
impl !Freeze for BridgeConfig
impl !RefUnwindSafe for BridgeConfig
impl !UnwindSafe for BridgeConfig
impl Send for BridgeConfig
impl Sync for BridgeConfig
impl Unpin for BridgeConfig
impl UnsafeUnpin for BridgeConfig
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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