ExLLM.Gemini.Tokens.CountTokensResponse (ex_llm v0.5.0)

View Source

Response from the token counting API.

Summary

Functions

Converts API response to CountTokensResponse struct.

Types

t()

@type t() :: %ExLLM.Gemini.Tokens.CountTokensResponse{
  cache_tokens_details: [ExLLM.Gemini.Tokens.ModalityTokenCount.t()] | nil,
  cached_content_token_count: integer() | nil,
  prompt_tokens_details: [ExLLM.Gemini.Tokens.ModalityTokenCount.t()] | nil,
  total_tokens: integer()
}

Functions

from_api(data)

@spec from_api(map()) :: t()

Converts API response to CountTokensResponse struct.