ExLLM.Gemini.Base (ex_llm v0.5.0)

View Source

Base HTTP request functionality for Gemini API modules.

Summary

Functions

Makes an HTTP request to the Gemini API.

Makes a streaming HTTP request to the Gemini API.

Types

request_opts()

@type request_opts() :: [
  method: :get | :post | :patch | :delete,
  url: String.t(),
  body: map() | nil,
  query: map(),
  api_key: String.t(),
  oauth_token: String.t(),
  opts: Keyword.t()
]

Functions

request(opts)

@spec request(request_opts()) :: {:ok, map()} | {:error, map()}

Makes an HTTP request to the Gemini API.

stream_request(opts)

@spec stream_request(request_opts()) :: {:ok, Enumerable.t()} | {:error, map()}

Makes a streaming HTTP request to the Gemini API.