UNPKG

llm-core

Version:

A unified TypeScript/JavaScript package providing a single interface for multiple LLM providers (OpenAI, Claude, Groq, Grok). Eliminate vendor lock-in with seamless provider switching, consistent responses, and built-in cost tracking.

133 lines (132 loc) 3.72 kB
{ "name": "llm-core", "version": "0.1.0", "description": "A unified TypeScript/JavaScript package providing a single interface for multiple LLM providers (OpenAI, Claude, Groq, Grok). Eliminate vendor lock-in with seamless provider switching, consistent responses, and built-in cost tracking.", "main": "dist/index.js", "module": "dist/index.mjs", "types": "dist/index.d.ts", "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.mjs", "require": "./dist/index.js" }, "./package.json": "./package.json" }, "files": [ "dist", "README.md", "LICENSE", "CHANGELOG.md" ], "scripts": { "build": "npm run clean && npm run build:types && npm run build:bundle && npm run build:analyze", "build:types": "tsc --emitDeclarationOnly", "build:bundle": "tsup src/index.ts --format cjs,esm --dts --minify --clean", "build:dev": "tsup src/index.ts --format cjs,esm --dts", "build:analyze": "npm run build:bundle -- --metafile && node scripts/analyze-bundle.js", "dev": "tsup src/index.ts --format cjs,esm --dts --watch", "test": "jest", "test:watch": "jest --watch", "test:coverage": "jest --coverage", "test:ci": "jest --ci --coverage --watchAll=false --detectOpenHandles --forceExit", "lint": "eslint src --ext .ts,.tsx", "lint:fix": "eslint src --ext .ts,.tsx --fix", "type-check": "tsc --noEmit", "clean": "rimraf dist coverage .tsbuildinfo", "prepublishOnly": "npm run lint && npm run type-check && npm run test:ci && npm run build", "postbuild": "npm run validate:package", "validate:package": "node scripts/validate-package.js", "size-check": "size-limit", "release": "npm run build && npm publish", "release:dry": "npm run build && npm publish --dry-run", "coverage:upload": "scripts/upload-coverage.sh", "coverage:ci": "npm run test:ci && npm run coverage:upload" }, "keywords": [ "llm", "ai", "artificial-intelligence", "openai", "claude", "anthropic", "groq", "grok", "chat", "completion", "typescript", "javascript", "unified-api", "multi-provider", "cost-tracking", "streaming", "tools", "function-calling" ], "author": { "name": "David Akpughe", "email": "davidakpughe@gmail.com", "url": "https://github.com/Akpughe/ts-llmcore" }, "license": "MIT", "dependencies": { "axios": "^1.6.0" }, "devDependencies": { "@size-limit/preset-small-lib": "^11.2.0", "@types/jest": "^29.5.0", "@types/node": "^20.0.0", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", "audit-ci": "^7.1.0", "eslint": "^8.0.0", "jest": "^29.5.0", "rimraf": "^5.0.0", "size-limit": "^11.2.0", "ts-jest": "^29.1.0", "tsup": "^8.0.0", "typescript": "^5.0.0" }, "peerDependencies": { "@groq/sdk": "^1.0.0", "anthropic": "^0.20.0", "openai": "^4.0.0" }, "peerDependenciesMeta": { "openai": { "optional": true }, "anthropic": { "optional": true }, "@groq/sdk": { "optional": true } }, "engines": { "node": ">=16.0.0", "npm": ">=7.0.0" }, "repository": { "type": "git", "url": "git+https://github.com/Akpughe/ts-llmcore.git" }, "bugs": { "url": "https://github.com/Akpughe/ts-llmcore/issues" }, "homepage": "https://github.com/Akpughe/ts-llmcore", "funding": { "type": "github", "url": "https://github.com/sponsors/Akpughe" }, "size-limit": [ { "path": "dist/index.js", "limit": "50 KB" }, { "path": "dist/index.mjs", "limit": "50 KB" } ] }