{"_id":"@dysporium-sdk/qwen","_rev":"4-69e99166ca7b608443db8bdf1b5eb5fe","name":"@dysporium-sdk/qwen","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"name":"@dysporium-sdk/qwen","version":"1.0.0","keywords":["ai","sdk","qwen","alibaba","llm"],"license":"MIT","_id":"@dysporium-sdk/qwen@1.0.0","maintainers":[{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"}],"homepage":"https://github.com/Dysporium/dysporium-ai-sdk#readme","bugs":{"url":"https://github.com/Dysporium/dysporium-ai-sdk/issues"},"dist":{"shasum":"45d43b477873780de5fd6ecb7cd6c81c3813ff6e","tarball":"https://registry.npmjs.org/@dysporium-sdk/qwen/-/qwen-1.0.0.tgz","fileCount":6,"integrity":"sha512-phx5aEaAZIGhpgYJN53AEgxy2HzgRLR3fi7tIFMM4z4Ew3DF76NdnEopdYEuDN7+wBZlSTq0SwTo902pZKv8hA==","signatures":[{"sig":"MEUCIQCMNZkDLmigjFbAcDWnNtAYmwcJg4ApXaURSPGZgvgbQwIgTEhP1vbZcYCAi1QJHWygogJa4hUaQNJIZBP0/f7+AgI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70698},"main":"./dist/index.js","type":"module","_from":"file:dysporium-sdk-qwen-1.0.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"},"_resolved":"C:\\Users\\paulm\\AppData\\Local\\Temp\\77d20a6ca0527e135a87654ef48ba6e3\\dysporium-sdk-qwen-1.0.0.tgz","_integrity":"sha512-phx5aEaAZIGhpgYJN53AEgxy2HzgRLR3fi7tIFMM4z4Ew3DF76NdnEopdYEuDN7+wBZlSTq0SwTo902pZKv8hA==","repository":{"url":"git+https://github.com/Dysporium/dysporium-ai-sdk.git","type":"git","directory":"packages/qwen"},"_npmVersion":"11.1.0","description":"Qwen provider for Dysporium SDK","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"^3.22.4","@dysporium-sdk/core":"1.0.0","@dysporium-sdk/provider":"1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.3.0","@types/node":"^20.10.0"},"_npmOperationalInternal":{"tmp":"tmp/qwen_1.0.0_1766039822318_0.4138454615317424","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@dysporium-sdk/qwen","version":"1.1.1","keywords":["ai","sdk","qwen","alibaba","llm"],"license":"MIT","_id":"@dysporium-sdk/qwen@1.1.1","maintainers":[{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"}],"homepage":"https://github.com/Dysporium/dysporium-ai-sdk#readme","bugs":{"url":"https://github.com/Dysporium/dysporium-ai-sdk/issues"},"dist":{"shasum":"a01b1a5970351a08e622bc3f3b379153d0533c85","tarball":"https://registry.npmjs.org/@dysporium-sdk/qwen/-/qwen-1.1.1.tgz","fileCount":6,"integrity":"sha512-1Q/YKiLsoTMZkE7cXUt64K9IK8JacGpwYXMstnVXQTqgt5pGn953aHPoiGuS3XiCqOyYj6I9t8/5rHlrie1vjA==","signatures":[{"sig":"MEYCIQCibp/dv2gx5nmII5rGzJjt8JhS7miiRlxidj6r214alAIhAP6tK+Fvomfs0xzjQCnyi03GEMHpOgRqmoXfx//GKJgp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":70734},"main":"./dist/index.js","type":"module","_from":"file:dysporium-sdk-qwen-1.1.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"},"_resolved":"C:\\Users\\paulm\\AppData\\Local\\Temp\\4753bad3696050cda395c26f2e30dc00\\dysporium-sdk-qwen-1.1.1.tgz","_integrity":"sha512-1Q/YKiLsoTMZkE7cXUt64K9IK8JacGpwYXMstnVXQTqgt5pGn953aHPoiGuS3XiCqOyYj6I9t8/5rHlrie1vjA==","repository":{"url":"git+https://github.com/Dysporium/dysporium-ai-sdk.git","type":"git","directory":"packages/qwen"},"_npmVersion":"11.1.0","description":"Qwen provider for Dysporium SDK","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"^3.22.4","@dysporium-sdk/core":"^1.0.0","@dysporium-sdk/provider":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.3.0","@types/node":"^20.10.0"},"_npmOperationalInternal":{"tmp":"tmp/qwen_1.1.1_1766506835590_0.016017326853688285","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@dysporium-sdk/qwen","version":"2.0.0","keywords":["ai","sdk","qwen","alibaba","llm"],"license":"MIT","_id":"@dysporium-sdk/qwen@2.0.0","maintainers":[{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"}],"homepage":"https://github.com/Dysporium/dysporium-ai-sdk#readme","bugs":{"url":"https://github.com/Dysporium/dysporium-ai-sdk/issues"},"dist":{"shasum":"d5e8fa2271b34035f830d7893ef85b2e63529a72","tarball":"https://registry.npmjs.org/@dysporium-sdk/qwen/-/qwen-2.0.0.tgz","fileCount":6,"integrity":"sha512-eW0Q3jA49ipgoZP0cpQjsIPYa8J+i9Vb89ok2KA511UupwapnmsSblnHu+nNCqm9TLiiTKd7ERopt2H/npTJyg==","signatures":[{"sig":"MEQCIC7tccdK7uotUxmiMy55uuJm0VWzzolS+qZ5mSW0BwoaAiBBDxfhdp8NCS3W6tUEZKwGT0TYbhfFu9WZwV4CWDPtnQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73895},"main":"./dist/index.js","type":"module","_from":"file:dysporium-sdk-qwen-2.0.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"},"_resolved":"C:\\Users\\paulm\\AppData\\Local\\Temp\\c16a4b817aa7660f28e5f1deee2c4151\\dysporium-sdk-qwen-2.0.0.tgz","_integrity":"sha512-eW0Q3jA49ipgoZP0cpQjsIPYa8J+i9Vb89ok2KA511UupwapnmsSblnHu+nNCqm9TLiiTKd7ERopt2H/npTJyg==","repository":{"url":"git+https://github.com/Dysporium/dysporium-ai-sdk.git","type":"git","directory":"packages/qwen"},"_npmVersion":"11.1.0","description":"Qwen provider for Dysporium SDK","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"^3.22.4","@dysporium-sdk/core":"^2.0.0","@dysporium-sdk/provider":"^2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.3.0","@types/node":"^20.10.0"},"_npmOperationalInternal":{"tmp":"tmp/qwen_2.0.0_1766772945905_0.36816205836854543","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@dysporium-sdk/qwen","version":"3.0.0","description":"Qwen provider for Dysporium SDK","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"keywords":["ai","sdk","qwen","alibaba","llm"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Dysporium/dysporium-ai-sdk.git","directory":"packages/qwen"},"publishConfig":{"access":"public"},"dependencies":{"@dysporium-sdk/core":"^3.0.0","@dysporium-sdk/provider":"^3.0.0","@dysporium-sdk/utils":"^3.0.0","zod":"^3.22.4"},"devDependencies":{"@types/node":"^20.10.0","tsup":"^8.0.0","typescript":"^5.3.0"},"scripts":{"build":"tsup","dev":"tsup --watch","clean":"rm -rf dist"},"_id":"@dysporium-sdk/qwen@3.0.0","bugs":{"url":"https://github.com/Dysporium/dysporium-ai-sdk/issues"},"homepage":"https://github.com/Dysporium/dysporium-ai-sdk#readme","_integrity":"sha512-bniYZ4II3U26Y3a6JJdu9gSXUdcBLV5nwdMlxRwxouwEwN0lILPMssrPYRV0GrBBNLgjyVQY17Pzo72Uf5FmDw==","_resolved":"C:\\Users\\paulm\\AppData\\Local\\Temp\\60496a40d49fec6dd9801ac90d22417b\\dysporium-sdk-qwen-3.0.0.tgz","_from":"file:dysporium-sdk-qwen-3.0.0.tgz","_nodeVersion":"20.19.6","_npmVersion":"11.1.0","dist":{"integrity":"sha512-bniYZ4II3U26Y3a6JJdu9gSXUdcBLV5nwdMlxRwxouwEwN0lILPMssrPYRV0GrBBNLgjyVQY17Pzo72Uf5FmDw==","shasum":"2b45bb34a2667e6abdf16cdaf13288a176838f3e","tarball":"https://registry.npmjs.org/@dysporium-sdk/qwen/-/qwen-3.0.0.tgz","fileCount":6,"unpackedSize":73933,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDrFNy8YjxGNJqhdBQ85gj6NlfRgFAtBmxDEPqZ5DqBzgIgGa6VYivcHPj6hm2zH+06fxNIsYMctfjmQ+ja7vnWLNw="}]},"_npmUser":{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"},"directories":{},"maintainers":[{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/qwen_3.0.0_1766839875781_0.02258169980091229"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-18T06:37:02.239Z","modified":"2025-12-27T12:51:16.163Z","1.0.0":"2025-12-18T06:37:02.460Z","1.1.1":"2025-12-23T16:20:35.747Z","2.0.0":"2025-12-26T18:15:46.042Z","3.0.0":"2025-12-27T12:51:15.935Z"},"bugs":{"url":"https://github.com/Dysporium/dysporium-ai-sdk/issues"},"license":"MIT","homepage":"https://github.com/Dysporium/dysporium-ai-sdk#readme","keywords":["ai","sdk","qwen","alibaba","llm"],"repository":{"type":"git","url":"git+https://github.com/Dysporium/dysporium-ai-sdk.git","directory":"packages/qwen"},"description":"Qwen provider for Dysporium SDK","maintainers":[{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"}],"readme":"# @dysporium-sdk/qwen\n\nQwen provider for Dysporium SDK - integrate Qwen models with a simple, type-safe API.\n\n## Installation\n\n```bash\nnpm install @dysporium-sdk/qwen\n# or\npnpm add @dysporium-sdk/qwen\n# or\nyarn add @dysporium-sdk/qwen\n```\n\n> **Note:** This package includes all exports from `@dysporium-sdk/core`, so you only need to install this single package.\n\n## Quick Start\n\n```typescript\nimport { createQwen, generateText, streamText } from '@dysporium-sdk/qwen';\n\nconst qwen = createQwen({\n  apiKey: process.env.QWEN_API_KEY,\n});\n\n// Generate text\nconst result = await generateText({\n  model: qwen('qwen2.5-72b-instruct'),\n  messages: [{ role: 'user', content: 'Hello!' }],\n});\n\nconsole.log(result.text);\n```\n\n## Features\n\n- Full Qwen API support (Qwen 2.5, Qwen 2.0, and Qwen 1.5 models)\n- Streaming responses\n- Tool/function calling\n- Automatic retries with exponential backoff\n- Full TypeScript support\n\n## Usage\n\n### Text Generation\n\n```typescript\nimport { createQwen, generateText } from '@dysporium-sdk/qwen';\n\nconst qwen = createQwen({ apiKey: 'your-api-key' });\n\nconst result = await generateText({\n  model: qwen('qwen2.5-72b-instruct'),\n  messages: [\n    { role: 'user', content: 'What is the capital of France?' },\n  ],\n  maxTokens: 100,\n  temperature: 0.7,\n});\n\nconsole.log(result.text);\nconsole.log(result.usage); // { inputTokens, outputTokens, totalTokens }\n```\n\n### Streaming\n\n```typescript\nimport { createQwen, streamText } from '@dysporium-sdk/qwen';\n\nconst qwen = createQwen({ apiKey: 'your-api-key' });\n\nconst stream = await streamText({\n  model: qwen('qwen2.5-72b-instruct'),\n  messages: [{ role: 'user', content: 'Write a poem about coding' }],\n});\n\nfor await (const chunk of stream) {\n  if (chunk.type === 'text-delta') {\n    process.stdout.write(chunk.textDelta);\n  }\n}\n```\n\n### Tool Calling\n\n```typescript\nimport { createQwen, generateText } from '@dysporium-sdk/qwen';\n\nconst qwen = createQwen({ apiKey: 'your-api-key' });\n\nconst result = await generateText({\n  model: qwen('qwen2.5-72b-instruct'),\n  messages: [{ role: 'user', content: 'What is the weather in Paris?' }],\n  tools: [\n    {\n      name: 'get_weather',\n      description: 'Get current weather for a location',\n      parameters: {\n        type: 'object',\n        properties: {\n          location: { type: 'string', description: 'City name' },\n        },\n        required: ['location'],\n      },\n    },\n  ],\n});\n\nif (result.toolCalls) {\n  console.log(result.toolCalls);\n}\n```\n\n## Supported Models\n\n### Latest Models (Qwen 3 Series)\n\n- `qwen3-235b-a22b-instruct` - Largest model with 235B parameters (22B active), supports ultra-long context up to 1M tokens\n- `qwen3-32b-instruct` - High-performance 32B parameter model for complex reasoning\n- `qwen3-8b-instruct` - Efficient 8B parameter model\n\n### Qwen 2.5 Models\n\n- `qwen2.5-72b-instruct` - Largest and most capable model\n- `qwen2.5-32b-instruct` - High performance model\n- `qwen2.5-14b-instruct` - Balanced performance\n- `qwen2.5-7b-instruct` - Efficient model\n- `qwen2.5-3b-instruct` - Lightweight model\n- `qwen2.5-1.5b-instruct` - Ultra-lightweight model\n- `qwen2.5-0.5b-instruct` - Minimal model\n\n### Qwen 2.5 Specialized Models\n\n- `qwen2.5-coder-32b-instruct` - Specialized for code generation tasks\n- `qwen2.5-math-72b-instruct` - Specialized for mathematical reasoning\n\n### Qwen 2.0 Models\n\n- `qwen2-72b-instruct` - Large model\n- `qwen2-57b-a14b-instruct` - Specialized model\n- `qwen2-32b-instruct` - High performance\n- `qwen2-14b-instruct` - Balanced\n- `qwen2-7b-instruct` - Efficient\n- `qwen2-1.5b-instruct` - Lightweight\n- `qwen2-0.5b-instruct` - Minimal\n\n### Qwen 1.5 Models\n\n- `qwen1.5-72b-chat` - Large chat model\n- `qwen1.5-32b-chat` - High performance chat\n- `qwen1.5-14b-chat` - Balanced chat\n- `qwen1.5-7b-chat` - Efficient chat\n- `qwen1.5-4b-chat` - Lightweight chat\n- `qwen1.5-1.8b-chat` - Ultra-lightweight chat\n- `qwen1.5-0.5b-chat` - Minimal chat\n\n## Configuration\n\n```typescript\nconst qwen = createQwen({\n  apiKey: 'your-api-key',\n  baseURL: 'https://dashscope.aliyuncs.com/api/v1', // Optional: custom base URL\n  retry: {\n    maxRetries: 3,\n    initialDelay: 1000,\n    maxDelay: 30000,\n  },\n});\n```\n\n## License\n\nMIT\n\n","readmeFilename":"README.md"}