pub struct LLMPreference {
pub llm_uuid: Option<Uuid>,
pub llm_id: Option<String>,
pub local: Option<bool>,
pub family_id: Option<String>,
pub capability_type: Option<CapabilityType>,
}
Expand description
Preference structure for calls that allow flexible choice of LLMs.
Preferences are sort-then-choose, meaning you’re preferences will not entirely exclude any result.
Preferences are evaluated in the following order:
- uuid
- llm_id
- local
- family_id
- capability_type
This means that if a uuid matches, it gets returned, otherwise the other preferences get evaluated. If more than one LLM matches, the results are filtered to those LLMs and the next preference is applied. If no capability type is provided, the final sorting (should multiple LLMs be left over) is based on CapabilityType::General.
Fields§
§llm_uuid: Option<Uuid>
§llm_id: Option<String>
§local: Option<bool>
§family_id: Option<String>
§capability_type: Option<CapabilityType>
Trait Implementations§
Source§impl Debug for LLMPreference
impl Debug for LLMPreference
Source§impl<'de> Deserialize<'de> for LLMPreference
impl<'de> Deserialize<'de> for LLMPreference
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 LLMPreference
impl RefUnwindSafe for LLMPreference
impl Send for LLMPreference
impl Sync for LLMPreference
impl Unpin for LLMPreference
impl UnwindSafe for LLMPreference
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