{"_id":"@aireact/core","_rev":"4-bde35aff2f2f89337ed4c6636f4c723a","name":"@aireact/core","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@aireact/core","version":"1.0.0","keywords":["react","ai","openai","claude","gemini","ollama","typescript"],"author":{"name":"reachbrt"},"license":"MIT","_id":"@aireact/core@1.0.0","maintainers":[{"name":"aivue","email":"reachbrt@gmail.com"}],"homepage":"https://github.com/reachbrt/reactai#readme","bugs":{"url":"https://github.com/reachbrt/reactai/issues"},"dist":{"shasum":"dd368dd9785d2cf9aa96d2eeb988bedf851ce953","tarball":"https://registry.npmjs.org/@aireact/core/-/core-1.0.0.tgz","fileCount":13,"integrity":"sha512-xTYAB3BG/mwC808WC9xbDL4j2rWYgVNcsY0dbr/J2YCLpQhW/UYbnggt6JTOeElTdzO2M2NYoG62VRBKX327kA==","signatures":[{"sig":"MEUCIQC6Cp4CzcMEGHXaaHamlZ5MkAJQ9LLnh/wjRR5lxLRelwIgFEsIPxQ0pj63Jw+jM5bUnEc6JTtJpASPXC6b76Ks5PU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44709},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"3578555f09dd610edce51f84a4d6d27a6b2146bd","scripts":{"dev":"vite build --watch","build":"tsc && vite build"},"_npmUser":{"name":"aivue","email":"reachbrt@gmail.com"},"repository":{"url":"git+https://github.com/reachbrt/reactai.git","type":"git"},"_npmVersion":"10.9.2","description":"Core AI functionality for ReactAI - Multi-provider AI client","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.10","typescript":"^5.3.3","@types/react":"^18.2.45","vite-plugin-dts":"^3.7.0","@types/react-dom":"^18.2.18","@vitejs/plugin-react":"^4.2.1"},"peerDependencies":{"react":"^18.0.0","react-dom":"^18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.0.0_1765693648275_0.14879598979964048","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@aireact/core","version":"1.0.1","keywords":["react","ai","openai","claude","gemini","ollama","typescript"],"author":{"name":"reachbrt"},"license":"MIT","_id":"@aireact/core@1.0.1","maintainers":[{"name":"aivue","email":"reachbrt@gmail.com"}],"homepage":"https://github.com/reachbrt/reactai#readme","bugs":{"url":"https://github.com/reachbrt/reactai/issues"},"dist":{"shasum":"941d55b992fa18d8c6ed332004a3e1dc93c547cf","tarball":"https://registry.npmjs.org/@aireact/core/-/core-1.0.1.tgz","fileCount":14,"integrity":"sha512-tAtIurRjOmeulCwnO2N76AyTE47g4KfZHHo87/ApOxTl3DH4W+DKguoYqjWn0pwgI49/+K7T6lELu6D5ptyABw==","signatures":[{"sig":"MEQCIGeHYkB5FLV9/DB+6oQBhqv9Iqstu9evXOz/I7vA4NqZAiA/7LjU2EyaDPaacvwc5U3uGGDy/1kIwpMjYIbhT337eg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47954},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"6857364eda430b8e9222514d3a5eeb6a5175c5b7","scripts":{"dev":"vite build --watch","build":"tsc && vite build"},"_npmUser":{"name":"aivue","email":"reachbrt@gmail.com"},"repository":{"url":"git+https://github.com/reachbrt/reactai.git","type":"git"},"_npmVersion":"10.9.2","description":"Core AI functionality for ReactAI - Multi-provider AI client","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.10","typescript":"^5.3.3","@types/react":"^18.2.45","vite-plugin-dts":"^3.7.0","@types/react-dom":"^18.2.18","@vitejs/plugin-react":"^4.2.1"},"peerDependencies":{"react":"^18.0.0","react-dom":"^18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.0.1_1765694936908_0.4974157960410941","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@aireact/core","version":"1.0.2","keywords":["react","ai","openai","claude","gemini","ollama","typescript"],"author":{"name":"reachbrt"},"license":"MIT","_id":"@aireact/core@1.0.2","maintainers":[{"name":"aivue","email":"reachbrt@gmail.com"}],"homepage":"https://github.com/reachbrt/AIReact#readme","bugs":{"url":"https://github.com/reachbrt/AIReact/issues"},"dist":{"shasum":"7035567ef811817123d55989b025f8397628533f","tarball":"https://registry.npmjs.org/@aireact/core/-/core-1.0.2.tgz","fileCount":14,"integrity":"sha512-q8u14JkPAc0+PJQzuxHAMCB+bUJrUiDvAjEElN8p1Z/pEv8QVdb/QRRg6ckeKBKHrdUpKWGF0XH7yKYS05NKvg==","signatures":[{"sig":"MEUCIHwg+0YiJ7tvkcMqsDQNcKlQmkThC+7pIFFtHytzftECAiEA5thITTA+6CnaAcG59vsm8sXQnVCCapKucjjCBWuvXGQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47954},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"6857364eda430b8e9222514d3a5eeb6a5175c5b7","scripts":{"dev":"vite build --watch","build":"tsc && vite build"},"_npmUser":{"name":"aivue","email":"reachbrt@gmail.com"},"repository":{"url":"git+https://github.com/reachbrt/AIReact.git","type":"git"},"_npmVersion":"10.9.2","description":"Core AI functionality for ReactAI - Multi-provider AI client","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.10","typescript":"^5.3.3","@types/react":"^18.2.45","vite-plugin-dts":"^3.7.0","@types/react-dom":"^18.2.18","@vitejs/plugin-react":"^4.2.1"},"peerDependencies":{"react":"^18.0.0","react-dom":"^18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/core_1.0.2_1765696305865_0.329574878736558","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@aireact/core","version":"1.0.3","description":"Core AI functionality for ReactAI - Multi-provider AI client","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsc && vite build","dev":"vite build --watch"},"peerDependencies":{"react":"^18.0.0","react-dom":"^18.0.0"},"devDependencies":{"@types/react":"^18.2.45","@types/react-dom":"^18.2.18","@vitejs/plugin-react":"^4.2.1","typescript":"^5.3.3","vite":"^5.0.10","vite-plugin-dts":"^3.7.0"},"keywords":["react","ai","openai","claude","gemini","ollama","typescript"],"author":{"name":"reachbrt"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/reachbrt/AIReact.git"},"homepage":"https://github.com/reachbrt/AIReact#readme","sideEffects":false,"_id":"@aireact/core@1.0.3","gitHead":"eb0d57118209adc317afca9ec14db9074a14377b","bugs":{"url":"https://github.com/reachbrt/AIReact/issues"},"_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-WzmpGsaYoqML+1rJtwQLbj+17c5ZpgSFSGZ1yatZNAk7rCGxGb4pB3aOWeQM+VlFqw4zgMx/ptfxNC4xlU1npw==","shasum":"c000d33c13e69bdc59a9ed0ce91a07ace7f2297b","tarball":"https://registry.npmjs.org/@aireact/core/-/core-1.0.3.tgz","fileCount":14,"unpackedSize":49003,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCBDRRiuTUg9zdCml83+eNF07IaQOcLd6Ux/Kbd7nTTrgIgCY0k57Ji8xbpfMAWFIxCOoCGUvwE9HWYIl/QKy3cIZE="}]},"_npmUser":{"name":"aivue","email":"reachbrt@gmail.com"},"directories":{},"maintainers":[{"name":"aivue","email":"reachbrt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_1.0.3_1766466238260_0.49321726096958063"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-14T06:27:28.187Z","modified":"2025-12-23T05:03:58.628Z","1.0.0":"2025-12-14T06:27:28.445Z","1.0.1":"2025-12-14T06:48:57.049Z","1.0.2":"2025-12-14T07:11:46.004Z","1.0.3":"2025-12-23T05:03:58.399Z"},"bugs":{"url":"https://github.com/reachbrt/AIReact/issues"},"author":{"name":"reachbrt"},"license":"MIT","homepage":"https://github.com/reachbrt/AIReact#readme","keywords":["react","ai","openai","claude","gemini","ollama","typescript"],"repository":{"type":"git","url":"git+https://github.com/reachbrt/AIReact.git"},"description":"Core AI functionality for ReactAI - Multi-provider AI client","maintainers":[{"name":"aivue","email":"reachbrt@gmail.com"}],"readme":"# @aireact/core\n\n🚀 **Core AI Functionality for React**\n\nMulti-provider AI client supporting OpenAI, Claude, Gemini, HuggingFace, Ollama, and DeepSeek with unified API.\n\n<p>\n  <a href=\"https://www.npmjs.com/package/@aireact/core\"><img src=\"https://img.shields.io/npm/v/@aireact/core.svg?style=flat-square\" alt=\"npm version\"></a>\n  <a href=\"https://www.npmjs.com/package/@aireact/core\"><img src=\"https://img.shields.io/npm/dm/@aireact/core\" alt=\"npm downloads\"></a>\n  <a href=\"https://github.com/reachbrt/AIReact/blob/main/LICENSE\"><img src=\"https://img.shields.io/npm/l/@aireact/core.svg?style=flat-square\" alt=\"MIT License\"></a>\n  <a href=\"https://github.com/reachbrt/AIReact\"><img src=\"https://img.shields.io/github/stars/reachbrt/AIReact?style=social\" alt=\"GitHub Stars\"></a>\n</p>\n\n## ✨ Features\n\n- **🔌 Multi-Provider Support**: OpenAI, Claude, Gemini, HuggingFace, Ollama, DeepSeek\n- **🔄 Streaming Responses**: Real-time token streaming for all providers\n- **🎯 Unified API**: Same interface across all AI providers\n- **📝 TypeScript First**: Full TypeScript support with comprehensive types\n- **⚡ React Hooks**: `useAIClient` hook for easy integration\n- **🛡️ Error Handling**: Robust error handling and fallback support\n\n## 📦 Installation\n\n```bash\nnpm install @aireact/core\n```\n\n## 🚀 Quick Start\n\n### Using the AIClient\n\n```tsx\nimport { AIClient } from '@aireact/core';\n\nconst client = new AIClient({\n  provider: 'openai',\n  apiKey: process.env.REACT_APP_OPENAI_API_KEY,\n  model: 'gpt-4o'\n});\n\n// Send a message\nconst response = await client.sendMessage('Hello, AI!');\nconsole.log(response);\n\n// Stream a response\nawait client.streamMessage('Tell me a story', (token) => {\n  console.log(token);\n});\n```\n\n### Using the React Hook\n\n```tsx\nimport { useAIClient } from '@aireact/core';\n\nfunction MyComponent() {\n  const { client, isReady, error } = useAIClient({\n    provider: 'openai',\n    apiKey: process.env.REACT_APP_OPENAI_API_KEY,\n    model: 'gpt-4o'\n  });\n\n  const handleSend = async () => {\n    if (client && isReady) {\n      const response = await client.sendMessage('Hello!');\n      console.log(response);\n    }\n  };\n\n  return (\n    <button onClick={handleSend} disabled={!isReady}>\n      Send Message\n    </button>\n  );\n}\n```\n\n## 🤖 Supported Providers\n\n| Provider | Models | Streaming |\n|----------|--------|-----------|\n| OpenAI | GPT-4, GPT-4o, GPT-3.5 | ✅ |\n| Anthropic | Claude 3, Claude 3.5 | ✅ |\n| Google | Gemini Pro, Gemini Ultra | ✅ |\n| HuggingFace | Various open models | ✅ |\n| Ollama | Llama, Mistral, etc. | ✅ |\n| DeepSeek | DeepSeek Chat, Coder | ✅ |\n\n## 📖 API Reference\n\n### AIClient Options\n\n```typescript\ninterface AIClientOptions {\n  provider: 'openai' | 'claude' | 'gemini' | 'huggingface' | 'ollama' | 'deepseek';\n  apiKey?: string;\n  model?: string;\n  baseUrl?: string;\n  organizationId?: string;\n  maxTokens?: number;\n  temperature?: number;\n}\n```\n\n### useAIClient Hook\n\n```typescript\nconst { \n  client,      // AIClient instance\n  isReady,     // Boolean - client is ready\n  error,       // Error | null\n  setProvider, // (provider: string) => void\n  setModel     // (model: string) => void\n} = useAIClient(options);\n```\n\n## 📦 Related Packages\n\n### React (@aireact)\n- [@aireact/chatbot](https://www.npmjs.com/package/@aireact/chatbot) - AI Chat Components\n- [@aireact/autosuggest](https://www.npmjs.com/package/@aireact/autosuggest) - AI-Powered Suggestions\n- [@aireact/smartform](https://www.npmjs.com/package/@aireact/smartform) - AI Form Validation\n- [@aireact/smart-datatable](https://www.npmjs.com/package/@aireact/smart-datatable) - AI Data Tables\n- [@aireact/360-spin](https://www.npmjs.com/package/@aireact/360-spin) - 360° Product Viewer\n\n### Vue.js (@aivue)\n- [@aivue/core](https://www.npmjs.com/package/@aivue/core) - Vue Core AI Client\n- [@aivue/chatbot](https://www.npmjs.com/package/@aivue/chatbot) - Vue Chat Components\n\n### Angular (@aiangular) - Coming Soon\n- @aiangular/core - Angular Core AI Client\n\n## 🔗 More Information\n\n- [GitHub Repository](https://github.com/reachbrt/AIReact)\n- [Full Documentation](https://github.com/reachbrt/AIReact/wiki)\n- [Report Issues](https://github.com/reachbrt/AIReact/issues)\n\n## 📄 License\n\nMIT © [Bharatkumar Subramanian](https://github.com/reachbrt)\n\n","readmeFilename":"README.md"}