pub struct ModelEndpoint {
pub model_name: String,
pub api_url: Option<String>,
pub api_key: Option<String>,
}Expand description
A model endpoint override for dual-model routing.
When api_url or api_key is None, the parent
[RemoteMultimodalConfigs] values are inherited at resolve time.
Fields§
§model_name: StringModel identifier for this endpoint (e.g. “gpt-4o-mini”).
api_url: Option<String>Optional API URL override. None inherits from parent.
api_key: Option<String>Optional API key override. None inherits from parent.
Implementations§
Source§impl ModelEndpoint
impl ModelEndpoint
Sourcepub fn new(model_name: impl Into<String>) -> ModelEndpoint
pub fn new(model_name: impl Into<String>) -> ModelEndpoint
Create a new model endpoint with just a model name.
Sourcepub fn with_api_url(self, url: impl Into<String>) -> ModelEndpoint
pub fn with_api_url(self, url: impl Into<String>) -> ModelEndpoint
Set the API URL override.
Sourcepub fn with_api_key(self, key: impl Into<String>) -> ModelEndpoint
pub fn with_api_key(self, key: impl Into<String>) -> ModelEndpoint
Set the API key override.
Trait Implementations§
Source§impl Clone for ModelEndpoint
impl Clone for ModelEndpoint
Source§fn clone(&self) -> ModelEndpoint
fn clone(&self) -> ModelEndpoint
Returns a duplicate of the value. Read more
1.0.0 · 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 ModelEndpoint
impl Debug for ModelEndpoint
Source§impl Default for ModelEndpoint
impl Default for ModelEndpoint
Source§fn default() -> ModelEndpoint
fn default() -> ModelEndpoint
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModelEndpoint
impl<'de> Deserialize<'de> for ModelEndpoint
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelEndpoint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelEndpoint, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ModelEndpoint
impl PartialEq for ModelEndpoint
Source§impl Serialize for ModelEndpoint
impl Serialize for ModelEndpoint
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for ModelEndpoint
impl StructuralPartialEq for ModelEndpoint
Auto Trait Implementations§
impl Freeze for ModelEndpoint
impl RefUnwindSafe for ModelEndpoint
impl Send for ModelEndpoint
impl Sync for ModelEndpoint
impl Unpin for ModelEndpoint
impl UnwindSafe for ModelEndpoint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.