pub struct Config {
pub base_url: String,
pub model: String,
pub api_key: Option<SecretString>,
pub max_tokens: u32,
}Expand description
Configuration for the TGI OAI-compatible adapter.
Fields§
§base_url: StringBase URL of the TGI server, for example http://localhost:8080.
model: StringDefault model identifier.
api_key: Option<SecretString>Optional bearer token for authenticated TGI deployments.
The value is redacted in debug output and serialization.
max_tokens: u32Max new tokens for generation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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