ExAthena.Chat.Ollama (ExAthena v0.18.0)

Copy Markdown View Source

Deprecated shim over Ollama model listing.

The /api/tags transport that used to live here now belongs to ExAthena.ModelListing, reached through the provider abstraction as ExAthena.list_models(:ollama). Keeping the HTTP call in a chat-side helper meant every host that wanted a model picker had to know Ollama's wire format — which is exactly what downstream apps ended up re-implementing.

These functions remain so existing callers keep working, and return the same sorted strings and error atoms they always did. New code should call ExAthena.list_models/2, which returns ExAthena.Model structs, reports context windows, and works for every provider rather than just this one.

Summary

Functions

List the Ollama cloud catalog (https://ollama.com/api/tags), each name suffixed with -cloud for invocation via a signed-in local daemon.

Functions

list_cloud_models(opts \\ [])

This function is deprecated. Use ExAthena.list_models(:ollama, include_cloud: true) instead.
@spec list_cloud_models(keyword()) ::
  {:ok, [String.t()]}
  | {:error, :ollama_unreachable | :unexpected_response | {:http, integer()}}

List the Ollama cloud catalog (https://ollama.com/api/tags), each name suffixed with -cloud for invocation via a signed-in local daemon.

list_models(opts \\ [])

This function is deprecated. Use ExAthena.list_models(:ollama) instead.
@spec list_models(keyword()) ::
  {:ok, [String.t()]}
  | {:error, :ollama_unreachable | :unexpected_response | {:http, integer()}}