{"_id":"@dysporium-sdk/core","_rev":"5-5d6d1c6162221b77bf4c79f1b28e2400","name":"@dysporium-sdk/core","dist-tags":{"latest":"3.0.0"},"versions":{"0.1.0":{"name":"@dysporium-sdk/core","version":"0.1.0","keywords":["ai","sdk","llm","language-model","openai","gpt"],"license":"MIT","_id":"@dysporium-sdk/core@0.1.0","maintainers":[{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"}],"homepage":"https://github.com/dysporium/dysporium-sdk#readme","bugs":{"url":"https://github.com/dysporium/dysporium-sdk/issues"},"dist":{"shasum":"40fb086ff8f2693850c447d8b188cccb28550d30","tarball":"https://registry.npmjs.org/@dysporium-sdk/core/-/core-0.1.0.tgz","fileCount":5,"integrity":"sha512-x6f25VHkkRN8OXc7fhRNt7PeU4gOc+l+HDXdtWtw6ApsE6FMTmzskhM23O4cg0nddxISGjhZvnd964rpHHb4VQ==","signatures":[{"sig":"MEQCIHZELjk4geG8xGAm83lueBKhQ9BwYhyVpqdYPRp+hlR+AiAOGnlqJJ1P9ANQgkW2+p9q47Pel26eDuwISe+u9njuLA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33153},"main":"./dist/index.js","type":"module","_from":"file:dysporium-sdk-core-0.1.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\\83db9d868ee3353c47deb848b0d8c098\\dysporium-sdk-core-0.1.0.tgz","_integrity":"sha512-x6f25VHkkRN8OXc7fhRNt7PeU4gOc+l+HDXdtWtw6ApsE6FMTmzskhM23O4cg0nddxISGjhZvnd964rpHHb4VQ==","repository":{"url":"git+https://github.com/dysporium/dysporium-sdk.git","type":"git","directory":"packages/core"},"_npmVersion":"11.1.0","description":"Core functionality for Dysporium SDK - AI/LLM integration library","directories":{},"_nodeVersion":"20.18.2","dependencies":{"@dysporium-sdk/provider":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.3.0","@types/node":"^20.10.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.0_1764935714689_0.03805829953197537","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@dysporium-sdk/core","version":"0.1.1","keywords":["ai","sdk","llm","language-model","openai","gpt"],"license":"MIT","_id":"@dysporium-sdk/core@0.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":"13762b0df8f0190d3a090cf63a99e7892cbc32bd","tarball":"https://registry.npmjs.org/@dysporium-sdk/core/-/core-0.1.1.tgz","fileCount":4,"integrity":"sha512-NcynKwY26abYrhrvjBLq2HPCswjcUUYq67tgh5yTv17DPwTrM/6E/+wX+2nMeuUTbkfcRcS4XeuG1v4/qbuvsw==","signatures":[{"sig":"MEUCIQCJ/1N3kJnTHehLaI+Q2IensWJqUkvDxsgPiXh/Bpau7QIgGR+qOQ1brMxMh3N83A7jiccS+Th103eTaRDYxCutg1w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32119},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"d030b8f349e279b4c6a9f0debba28701a554bb8e","scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"},"repository":{"url":"git+https://github.com/Dysporium/dysporium-ai-sdk.git","type":"git","directory":"packages/core"},"_npmVersion":"11.1.0","description":"Core functionality for Dysporium SDK - AI/LLM integration library","directories":{},"_nodeVersion":"20.18.2","dependencies":{"@dysporium-sdk/provider":"workspace:*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.3.0","@types/node":"^20.10.0"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.1_1765275381078_0.35889256500897004","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@dysporium-sdk/core","version":"1.0.0","keywords":["ai","sdk","llm","language-model","openai","gpt"],"license":"MIT","_id":"@dysporium-sdk/core@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":"9e3cd159da493cacdc46801e523f8b23135ecef4","tarball":"https://registry.npmjs.org/@dysporium-sdk/core/-/core-1.0.0.tgz","fileCount":6,"integrity":"sha512-zt766NK9RnT1tNUZ5osgpolETIreGQ9rzBIUacAIFrImRZiacht9R/VlX2y3X1ZIb/Z2IxtCHe/mphdVrgDQiQ==","signatures":[{"sig":"MEUCICC7EMpm2Rx2QjtbMUy7uHhEPfQtsvW9fcH4dnmkTXyeAiEAyk78vrhkbrl6i86s6rROEyRBpfNyEaYu3KxJEZr5P4M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35659},"main":"./dist/index.js","type":"module","_from":"file:dysporium-sdk-core-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\\c68a0a37da7f159fc0ff4f442e757e2e\\dysporium-sdk-core-1.0.0.tgz","_integrity":"sha512-zt766NK9RnT1tNUZ5osgpolETIreGQ9rzBIUacAIFrImRZiacht9R/VlX2y3X1ZIb/Z2IxtCHe/mphdVrgDQiQ==","repository":{"url":"git+https://github.com/Dysporium/dysporium-ai-sdk.git","type":"git","directory":"packages/core"},"_npmVersion":"11.1.0","description":"Core functionality for Dysporium SDK - AI/LLM integration library","directories":{},"_nodeVersion":"20.18.2","dependencies":{"@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/core_1.0.0_1765276584424_0.053405919149620784","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@dysporium-sdk/core","version":"2.0.0","keywords":["ai","sdk","llm","language-model","openai","gpt"],"license":"MIT","_id":"@dysporium-sdk/core@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":"3d438c7646f9ce663671bd0dbc509f6e7004e9d9","tarball":"https://registry.npmjs.org/@dysporium-sdk/core/-/core-2.0.0.tgz","fileCount":6,"integrity":"sha512-4y6UsnFelXrSjAsSK39m7j2m94br9Y7l4lwQ82BJ3nebTUE4LUnvc1vnnxY7Di7eQl1SifJv+vH3eUvEZSshbQ==","signatures":[{"sig":"MEUCIQCnZKwZ7TUVVAresWvSOUCZ6zJqr4za2vIjeX8W5mx4yAIgffgf3S5SxgtSV0Z4GxfLbAeqCS1LdtDexpdUwm7TsPc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40639},"main":"./dist/index.js","type":"module","_from":"file:dysporium-sdk-core-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\\8017de8875e75c9dff3ff5ab6f58d266\\dysporium-sdk-core-2.0.0.tgz","_integrity":"sha512-4y6UsnFelXrSjAsSK39m7j2m94br9Y7l4lwQ82BJ3nebTUE4LUnvc1vnnxY7Di7eQl1SifJv+vH3eUvEZSshbQ==","repository":{"url":"git+https://github.com/Dysporium/dysporium-ai-sdk.git","type":"git","directory":"packages/core"},"_npmVersion":"11.1.0","description":"Core functionality for Dysporium SDK - AI/LLM integration library","directories":{},"_nodeVersion":"20.19.6","dependencies":{"@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/core_2.0.0_1766772945783_0.7635495865103246","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@dysporium-sdk/core","version":"3.0.0","description":"Core functionality for Dysporium SDK - AI/LLM integration library","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"keywords":["ai","sdk","llm","language-model","openai","gpt"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Dysporium/dysporium-ai-sdk.git","directory":"packages/core"},"publishConfig":{"access":"public"},"dependencies":{"@dysporium-sdk/provider":"^3.0.0","@dysporium-sdk/utils":"^3.0.0"},"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/core@3.0.0","bugs":{"url":"https://github.com/Dysporium/dysporium-ai-sdk/issues"},"homepage":"https://github.com/Dysporium/dysporium-ai-sdk#readme","_integrity":"sha512-Oxsv/c4BqABDrWzW4rcDQmLN1hCCfWCb6CeYjD3mKf+o6JwV9TodLYsrOfIGR0C1syt5fb+O5YWVBdUsJ6VUeQ==","_resolved":"C:\\Users\\paulm\\AppData\\Local\\Temp\\ae6e6319244985b41e410e3efb0732eb\\dysporium-sdk-core-3.0.0.tgz","_from":"file:dysporium-sdk-core-3.0.0.tgz","_nodeVersion":"20.19.6","_npmVersion":"11.1.0","dist":{"integrity":"sha512-Oxsv/c4BqABDrWzW4rcDQmLN1hCCfWCb6CeYjD3mKf+o6JwV9TodLYsrOfIGR0C1syt5fb+O5YWVBdUsJ6VUeQ==","shasum":"0751eb6765d01538afb52da287efac7a4c054f56","tarball":"https://registry.npmjs.org/@dysporium-sdk/core/-/core-3.0.0.tgz","fileCount":6,"unpackedSize":43537,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIC8cFfqYfm7soiWOFGVxdHnMQRxgc72/UnxXHFeHZDQkAiAfmLQncVeZo+WmZgnn/0qFc7ERlfgXz3EbI+8BpdQStw=="}]},"_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/core_3.0.0_1766839875980_0.9050339633316773"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-05T11:55:14.626Z","modified":"2025-12-27T12:51:16.361Z","0.1.0":"2025-12-05T11:55:14.858Z","0.1.1":"2025-12-09T10:16:21.219Z","1.0.0":"2025-12-09T10:36:24.564Z","2.0.0":"2025-12-26T18:15:45.940Z","3.0.0":"2025-12-27T12:51:16.167Z"},"bugs":{"url":"https://github.com/Dysporium/dysporium-ai-sdk/issues"},"license":"MIT","homepage":"https://github.com/Dysporium/dysporium-ai-sdk#readme","keywords":["ai","sdk","llm","language-model","openai","gpt"],"repository":{"type":"git","url":"git+https://github.com/Dysporium/dysporium-ai-sdk.git","directory":"packages/core"},"description":"Core functionality for Dysporium SDK - AI/LLM integration library","maintainers":[{"name":"paulmothapo","email":"paulmothapo.personal@gmail.com"}],"readme":"# @dysporium-sdk/core\r\n\r\nCore functionality for Dysporium SDK - a TypeScript library for AI/LLM integration.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @dysporium-sdk/core\r\n# or\r\npnpm add @dysporium-sdk/core\r\n# or\r\nyarn add @dysporium-sdk/core\r\n```\r\n\r\n## Features\r\n\r\n- **Text Generation** - Generate text completions with any supported LLM\r\n- **Streaming** - Stream text responses in real-time\r\n- **Embeddings** - Generate and compare text embeddings\r\n- **Tool Calling** - Define and use tools/functions with LLMs\r\n- **JSON Parsing** - Structured output parsing from LLM responses\r\n\r\n## Usage\r\n\r\n### Generate Text\r\n\r\n```typescript\r\nimport { generateText } from '@dysporium-sdk/core';\r\nimport { createOpenAI } from '@dysporium-sdk/openai';\r\n\r\nconst openai = createOpenAI({ apiKey: 'your-api-key' });\r\n\r\nconst result = await generateText({\r\n  model: openai('gpt-4'),\r\n  messages: [{ role: 'user', content: 'Hello, world!' }],\r\n});\r\n\r\nconsole.log(result.text);\r\n```\r\n\r\n### Stream Text\r\n\r\n```typescript\r\nimport { streamText } from '@dysporium-sdk/core';\r\n\r\nconst stream = await streamText({\r\n  model: openai('gpt-4'),\r\n  messages: [{ role: 'user', content: 'Write a short story' }],\r\n});\r\n\r\nfor await (const chunk of stream) {\r\n  process.stdout.write(chunk.text);\r\n}\r\n```\r\n\r\n### Embeddings\r\n\r\n```typescript\r\nimport { embed, cosineSimilarity } from '@dysporium-sdk/core';\r\nimport { createOpenAIEmbedding } from '@dysporium-sdk/openai';\r\n\r\nconst embeddingModel = createOpenAIEmbedding({ apiKey: 'your-api-key' });\r\n\r\nconst result1 = await embed({\r\n  model: embeddingModel('text-embedding-3-small'),\r\n  value: 'Hello world',\r\n});\r\n\r\nconst result2 = await embed({\r\n  model: embeddingModel('text-embedding-3-small'),\r\n  value: 'Hi there',\r\n});\r\n\r\nconst similarity = cosineSimilarity(result1.embedding, result2.embedding);\r\n```\r\n\r\n## API Reference\r\n\r\n### Functions\r\n\r\n| Function | Description |\r\n|----------|-------------|\r\n| `generateText` | Generate text completion from a model |\r\n| `streamText` | Stream text completion in real-time |\r\n| `parseJSON` | Parse JSON from model output |\r\n| `embed` | Generate embedding for a single value |\r\n| `embedMany` | Generate embeddings for multiple values |\r\n| `cosineSimilarity` | Calculate cosine similarity between embeddings |\r\n| `euclideanDistance` | Calculate Euclidean distance between embeddings |\r\n| `findSimilar` | Find most similar embeddings |\r\n\r\n### Classes\r\n\r\n| Class | Description |\r\n|-------|-------------|\r\n| `DysporiumClient` | High-level client for AI operations |\r\n\r\n## License\r\n\r\nMIT\r\n\r\n","readmeFilename":"README.md"}