pub struct CompatibleConfig {
pub provider_name: String,
pub api_key: String,
pub base_url: String,
pub model: String,
pub max_tokens: u32,
pub embedding_model: Option<String>,
}Expand description
Configuration for CompatibleProvider.
Pass to CompatibleProvider::new instead of individual positional arguments to avoid
silent parameter transposition.
§Examples
use zeph_llm::compatible::{CompatibleConfig, CompatibleProvider};
let cfg = CompatibleConfig {
provider_name: "together-ai".into(),
api_key: "key".into(),
base_url: "https://api.together.xyz/v1".into(),
model: "meta-llama/Llama-3.3-70B-Instruct-Turbo".into(),
max_tokens: 4096,
embedding_model: None,
};
let provider = CompatibleProvider::new(cfg);Fields§
§provider_name: StringHuman-readable provider name used in logs and LlmProvider::name.
api_key: StringSecret API key sent in the Authorization: Bearer header.
base_url: StringBase URL of the endpoint, e.g. "https://api.together.xyz/v1".
model: StringChat model identifier.
max_tokens: u32Upper bound on completion tokens returned by the model.
embedding_model: Option<String>Embedding model identifier. Set to None when the endpoint does not support embeddings.
Trait Implementations§
Source§impl Clone for CompatibleConfig
impl Clone for CompatibleConfig
Source§fn clone(&self) -> CompatibleConfig
fn clone(&self) -> CompatibleConfig
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 CompatibleConfig
impl RefUnwindSafe for CompatibleConfig
impl Send for CompatibleConfig
impl Sync for CompatibleConfig
impl Unpin for CompatibleConfig
impl UnsafeUnpin for CompatibleConfig
impl UnwindSafe for CompatibleConfig
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