llm7-models
v1.0.1
Published
Fetches LLM7 models JSON with optional caching.
Readme
LLM7 Models
A small utility for Cloudflare Workers and Node.js that fetches LLM7 models JSON from an R2 bucket with optional in-memory caching.
Installation
npm install llm7-modelsUsage
import fetchModels from 'llm7-models';
const models = await fetchModels(); // uses default 30 minute cache
const fresh = await fetchModels({ cacheDuration: 5 * 60 * 1000 }); // custom cache timeBy default the result is cached for 30 minutes. Pass cacheDuration (in milliseconds) to override.
License
AGPL-3.0-only
