pub struct ModelListParams {
pub after_id: Option<String>,
pub before_id: Option<String>,
pub limit: Option<u32>,
pub betas: Option<Vec<String>>,
}anthropic-client only.Expand description
Parameters for listing models.
This struct contains the parameters that can be passed when listing models from the Anthropic API.
Fields§
§after_id: Option<String>ID of the object to use as a cursor for pagination.
When provided, returns the page of results immediately after this object.
before_id: Option<String>ID of the object to use as a cursor for pagination.
When provided, returns the page of results immediately before this object.
limit: Option<u32>Number of items to return per page.
Defaults to 20. Ranges from 1 to 1000.
betas: Option<Vec<String>>Optional header to specify the beta version(s) you want to use.
Implementations§
Source§impl ModelListParams
impl ModelListParams
Sourcepub fn new() -> ModelListParams
pub fn new() -> ModelListParams
Create a new, empty instance of ModelListParams.
Sourcepub fn with_after_id(self, after_id: impl Into<String>) -> ModelListParams
pub fn with_after_id(self, after_id: impl Into<String>) -> ModelListParams
Set the after_id parameter for pagination.
When provided, returns the page of results immediately after this object.
Sourcepub fn with_before_id(self, before_id: impl Into<String>) -> ModelListParams
pub fn with_before_id(self, before_id: impl Into<String>) -> ModelListParams
Set the before_id parameter for pagination.
When provided, returns the page of results immediately before this object.
Sourcepub fn with_limit(self, limit: u32) -> ModelListParams
pub fn with_limit(self, limit: u32) -> ModelListParams
Set the limit for the number of items to return per page.
Defaults to 20. Ranges from 1 to 1000.
Sourcepub fn with_betas(self, betas: Vec<String>) -> ModelListParams
pub fn with_betas(self, betas: Vec<String>) -> ModelListParams
Set the beta versions to use for this request.
Sourcepub fn with_beta(self, beta: String) -> ModelListParams
pub fn with_beta(self, beta: String) -> ModelListParams
Add a single beta version to use for this request.
Trait Implementations§
Source§impl Clone for ModelListParams
impl Clone for ModelListParams
Source§fn clone(&self) -> ModelListParams
fn clone(&self) -> ModelListParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ModelListParams
impl Debug for ModelListParams
Source§impl Default for ModelListParams
impl Default for ModelListParams
Source§fn default() -> ModelListParams
fn default() -> ModelListParams
Source§impl<'de> Deserialize<'de> for ModelListParams
impl<'de> Deserialize<'de> for ModelListParams
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelListParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelListParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ModelListParams
impl Serialize for ModelListParams
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,
Auto Trait Implementations§
impl Freeze for ModelListParams
impl RefUnwindSafe for ModelListParams
impl Send for ModelListParams
impl Sync for ModelListParams
impl Unpin for ModelListParams
impl UnsafeUnpin for ModelListParams
impl UnwindSafe for ModelListParams
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request