pub struct ServerConfig {
pub context_length: Option<usize>,
}Expand description
Server-level defaults for a specific model.
Stores per-model server configuration parameters that override global settings but can themselves be overridden at request time. This is part of the 4-level fallback chain:
- Runtime request / CLI flag (highest priority)
- Model
server_defaults(from DB, stored as JSON inserver_defaultscolumn) - Global app setting
- Hardcoded default (lowest priority)
All fields are optional to support partial configuration.
§Examples
use gglib_core::domain::ServerConfig;
// Override only the context length for a long-context model
let config = ServerConfig {
context_length: Some(32768),
};Fields§
§context_length: Option<usize>Context length (number of tokens) for the model server.
Controls the maximum context window the server will use. Common values: 4096 (default), 8192, 32768, 131072
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
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 moreSource§impl Debug for ServerConfig
impl Debug for ServerConfig
Source§impl Default for ServerConfig
impl Default for ServerConfig
Source§fn default() -> ServerConfig
fn default() -> ServerConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ServerConfig
impl<'de> Deserialize<'de> for ServerConfig
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
Source§impl PartialEq for ServerConfig
impl PartialEq for ServerConfig
Source§fn eq(&self, other: &ServerConfig) -> bool
fn eq(&self, other: &ServerConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ServerConfig
impl Serialize for ServerConfig
impl Eq for ServerConfig
impl StructuralPartialEq for ServerConfig
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
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