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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more