Gemini.Types.Response.ListModelsResponse (GeminiEx v0.2.1)

View Source

Response structure for listing models.

Contains the list of models and pagination information.

Summary

Functions

Filter models by a predicate function.

Group models by a classification function.

Check if there are more pages available.

Get the total number of models in this response.

Extract model names from the response.

Types

t()

@type t() :: %Gemini.Types.Response.ListModelsResponse{
  models: [Gemini.Types.Response.Model.t()],
  next_page_token: String.t() | nil
}

Functions

filter_models(list_models_response, predicate)

@spec filter_models(t(), (Gemini.Types.Response.Model.t() -> boolean())) :: [
  Gemini.Types.Response.Model.t()
]

Filter models by a predicate function.

group_models(list_models_response, classifier)

@spec group_models(t(), (Gemini.Types.Response.Model.t() -> term())) :: map()

Group models by a classification function.

has_next_page?(list_models_response)

@spec has_next_page?(t()) :: boolean()

Check if there are more pages available.

model_count(list_models_response)

@spec model_count(t()) :: non_neg_integer()

Get the total number of models in this response.

model_names(list_models_response)

@spec model_names(t()) :: [String.t()]

Extract model names from the response.