Gemini.Types.Request.GetModelRequest (GeminiEx v0.0.1)

View Source

Request structure for getting a specific model.

Summary

Functions

Create a new GetModelRequest with name normalization.

Types

t()

@type t() :: %Gemini.Types.Request.GetModelRequest{name: String.t()}

Functions

new(model_name)

@spec new(String.t()) :: {:ok, t()} | {:error, String.t()}

Create a new GetModelRequest with name normalization.

Examples

iex> GetModelRequest.new("gemini-2.0-flash")
{:ok, %GetModelRequest{name: "models/gemini-2.0-flash"}}

iex> GetModelRequest.new("models/gemini-1.5-pro")
{:ok, %GetModelRequest{name: "models/gemini-1.5-pro"}}

iex> GetModelRequest.new("")
{:error, "Model name cannot be empty"}