pub struct ListModelsParams {
pub ai_service: Option<String>,
pub provider: Option<String>,
pub limit: Option<i32>,
pub offset: Option<i32>,
pub sort: Option<ModelSortField>,
pub order: Option<SortOrder>,
}Expand description
Parameters for listing models.
§Example
use portkey_sdk::model::{ListModelsParams, ModelSortField, SortOrder};
let params = ListModelsParams {
ai_service: Some("openai".to_string()),
provider: Some("openai".to_string()),
limit: Some(10),
offset: Some(0),
sort: Some(ModelSortField::Name),
order: Some(SortOrder::Asc),
};Fields§
§ai_service: Option<String>Filter models by the AI service (e.g., ‘openai’, ‘anthropic’).
provider: Option<String>Filter models by the provider.
limit: Option<i32>The maximum number of models to return.
offset: Option<i32>The number of models to skip before starting to collect the result set.
sort: Option<ModelSortField>The field to sort the results by.
order: Option<SortOrder>The order to sort the results in.
Trait Implementations§
Source§impl Clone for ListModelsParams
impl Clone for ListModelsParams
Source§fn clone(&self) -> ListModelsParams
fn clone(&self) -> ListModelsParams
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 ListModelsParams
impl Debug for ListModelsParams
Source§impl Default for ListModelsParams
impl Default for ListModelsParams
Source§fn default() -> ListModelsParams
fn default() -> ListModelsParams
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ListModelsParams
impl<'de> Deserialize<'de> for ListModelsParams
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 ListModelsParams
impl RefUnwindSafe for ListModelsParams
impl Send for ListModelsParams
impl Sync for ListModelsParams
impl Unpin for ListModelsParams
impl UnwindSafe for ListModelsParams
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