pub struct InferenceConfig {
pub base_url: String,
pub model: String,
pub api_key: Option<String>,
pub api: Option<ApiKind>,
pub params: Params,
pub context: Option<u32>,
}Expand description
Where and how to reach the model. Replaces hob’s local llama.cpp setup.
Fields§
§base_url: StringBase URL of the API, e.g. http://127.0.0.1:8080/v1.
model: StringModel name to request; many single-model servers ignore it.
api_key: Option<String>Optional API key (a bearer token, or Anthropic’s x-api-key).
api: Option<ApiKind>The API the endpoint speaks; None decides from the URL (InferenceConfig::api_kind).
params: ParamsRequest options of the profile this endpoint came from (temperature, max_tokens,
effort, extra body fields): byob-llm adds them to every chat request made with it
(see byob_llm::params). Never to the probe’s own requests.
context: Option<u32>Context window to budget against, beating what the probe found (a profile’s
profile::Profile::context).
Implementations§
Trait Implementations§
Source§impl Clone for InferenceConfig
impl Clone for InferenceConfig
Source§impl Debug for InferenceConfig
impl Debug for InferenceConfig
Source§impl Default for InferenceConfig
impl Default for InferenceConfig
Source§impl<'de> Deserialize<'de> for InferenceConfig
impl<'de> Deserialize<'de> for InferenceConfig
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 InferenceConfig
impl PartialEq for InferenceConfig
Source§impl Serialize for InferenceConfig
impl Serialize for InferenceConfig
impl StructuralPartialEq for InferenceConfig
Auto Trait Implementations§
impl Forget for InferenceConfig
impl Freeze for InferenceConfig
impl Move for InferenceConfig
impl RefUnwindSafe for InferenceConfig
impl Send for InferenceConfig
impl Sync for InferenceConfig
impl Unpin for InferenceConfig
impl UnsafeUnpin for InferenceConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
impl UnwindSafe for InferenceConfig
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