Remote source for Zenmux models (https://zenmux.ai/api/v1/models).
pull/1fetches data from Zenmux API and caches locallyload/1reads from cached file (no network call)
Options
:url- API endpoint (default: "https://zenmux.ai/api/v1/models"):api_key- Zenmux API key (required, or setZENMUX_API_KEYenv var):req_opts- Additional Req options for testing
Configuration
Cache directory can be configured in application config:
config :llm_db,
zenmux_cache_dir: "priv/llm_db/remote"Default: "priv/llm_db/remote"
Usage
# Pull remote data and cache (requires API key)
mix llm_db.pull --source zenmux
# Load from cache
{:ok, data} = Zenmux.load(%{})
Summary
Functions
Transforms Zenmux API response to canonical Zoi format. Zenmux is OpenAI compatible, so the structure mirrors OpenAI's.
Functions
Transforms Zenmux API response to canonical Zoi format. Zenmux is OpenAI compatible, so the structure mirrors OpenAI's.
Input Format (Expected)
{
"object": "list",
"data": [
{
"id": "gpt-4",
"object": "model",
"created": 1686935002,
"owned_by": "openai"
}
]
}Output Format (Canonical Zoi)
%{
"zenmux" => %{
id: :zenmux,
name: "Zenmux",
models: [
%{
id: "gpt-4",
provider: :zenmux,
extra: %{
created: 1686935002,
owned_by: "openai"
}
}
]
}
}