{"_id":"@automatenew/ai","_rev":"1-89d84356edd3a89059e9cedc703739f0","name":"@automatenew/ai","dist-tags":{"latest":"4.1.21-fork.1"},"versions":{"4.1.21-fork.0":{"name":"@automatenew/ai","version":"4.1.21-fork.0","keywords":["ai","vercel","react","next","nextjs"],"license":"Apache-2.0","_id":"@automatenew/ai@4.1.21-fork.0","maintainers":[{"name":"automatenew","email":"accounts@fullpilot.com"}],"homepage":"https://github.com/brandonhays3/ai#readme","bugs":{"url":"https://github.com/brandonhays3/ai/issues"},"dist":{"shasum":"ef7555a55d9bb813c8e227b822e62f5cb279be41","tarball":"https://registry.npmjs.org/@automatenew/ai/-/ai-4.1.21-fork.0.tgz","fileCount":32,"integrity":"sha512-esiNZBwupucTKyrdCTnYg16pHkWWMTibGLHI/ajVI7nimzV4+Dum1sZvleBltLkOpyiy93PnJRZ2cFPY2Xbryw==","signatures":[{"sig":"MEQCIAcz3rMv36NrQTJlYLJypdONsSDfxbisAsiGYXvBC5nlAiAVjgehBOo8lSHLysY3k0aL9ofoKwKDpfV/OWk5MBmNRg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1981278},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./rsc":{"types":"./rsc/dist/index.d.ts","import":"./rsc/dist/rsc-client.mjs","react-server":"./rsc/dist/rsc-server.mjs"},"./test":{"types":"./test/dist/index.d.ts","import":"./test/dist/index.mjs","module":"./test/dist/index.mjs","require":"./test/dist/index.js"},"./react":{"types":"./react/dist/index.d.ts","import":"./react/dist/index.mjs","require":"./react/dist/index.js","react-server":"./react/dist/index.server.mjs"},"./package.json":"./package.json"},"gitHead":"7121d292275a8080e6471be717a8a7662fbc2b7a","scripts":{"lint":"eslint \"./**/*.ts*\"","test":"pnpm test:node && pnpm test:edge && pnpm test:ui && pnpm test:e2e","build":"tsup","clean":"rm -rf dist && rm -rf react/dist && rm -rf rsc/dist","test:ui":"pnpm test:ui:react","test:e2e":"playwright test","test:edge":"vitest --config vitest.edge.config.js --run","test:node":"vitest --config vitest.node.config.js --run","type-check":"tsc --noEmit","build:watch":"tsup --watch","test:ui:react":"vitest --config vitest.ui.react.config.js --run","prettier-check":"prettier --check \"./**/*.ts*\"","test:node:core":"pnpm vitest --config vitest.node.config.js --run ./core/","test:node:util":"pnpm vitest --config vitest.node.config.js --run ./util/","test:edge:watch":"vitest --config vitest.edge.config.js","test:node:watch":"vitest --config vitest.node.config.js","test:ui:react:watch":"vitest --config vitest.ui.react.config.js"},"_npmUser":{"name":"automatenew","email":"accounts@fullpilot.com"},"repository":{"url":"git+https://github.com/brandonhays3/ai.git","type":"git"},"_npmVersion":"10.7.0","description":"Fork of Vercel AI SDK - The AI Toolkit for TypeScript and JavaScript","directories":{},"sideEffects":false,"_nodeVersion":"18.20.4","dependencies":{"@ai-sdk/react":"1.1.10","jsondiffpatch":"0.6.0","@ai-sdk/provider":"1.0.7","@ai-sdk/ui-utils":"1.1.10","@opentelemetry/api":"1.9.0","@ai-sdk/provider-utils":"2.1.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"3.23.8","tsup":"^7.2.0","eslint":"8.57.1","react-dom":"^18","typescript":"5.6.3","@types/node":"^18","@types/react":"^18","@edge-runtime/vm":"^5.0.0","@types/react-dom":"^18","@vercel/ai-tsconfig":"workspace:*","@vitejs/plugin-react":"4.3.3","eslint-config-vercel-ai":"workspace:*","react-server-dom-webpack":"18.3.0-canary-eb33bd747-20240312"},"peerDependencies":{"zod":"^3.0.0","react":"^18 || ^19 || ^19.0.0-rc"},"peerDependenciesMeta":{"zod":{"optional":true},"react":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/ai_4.1.21-fork.0_1738775255664_0.6813967748502381","host":"s3://npm-registry-packages-npm-production"}},"4.1.21-fork.1":{"name":"@automatenew/ai","version":"4.1.21-fork.1","description":"Fork of Vercel AI SDK - The AI Toolkit for TypeScript and JavaScript","license":"Apache-2.0","sideEffects":false,"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"tsup","build:watch":"tsup --watch","clean":"rm -rf dist && rm -rf react/dist && rm -rf rsc/dist","lint":"eslint \"./**/*.ts*\"","type-check":"tsc --noEmit","prettier-check":"prettier --check \"./**/*.ts*\"","test":"pnpm test:node && pnpm test:edge && pnpm test:ui && pnpm test:e2e","test:e2e":"playwright test","test:edge":"vitest --config vitest.edge.config.js --run","test:edge:watch":"vitest --config vitest.edge.config.js","test:node":"vitest --config vitest.node.config.js --run","test:node:watch":"vitest --config vitest.node.config.js","test:node:core":"pnpm vitest --config vitest.node.config.js --run ./core/","test:node:util":"pnpm vitest --config vitest.node.config.js --run ./util/","test:ui":"pnpm test:ui:react","test:ui:react":"vitest --config vitest.ui.react.config.js --run","test:ui:react:watch":"vitest --config vitest.ui.react.config.js"},"exports":{"./package.json":"./package.json",".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./test":{"types":"./test/dist/index.d.ts","import":"./test/dist/index.mjs","module":"./test/dist/index.mjs","require":"./test/dist/index.js"},"./rsc":{"types":"./rsc/dist/index.d.ts","react-server":"./rsc/dist/rsc-server.mjs","import":"./rsc/dist/rsc-client.mjs"},"./react":{"types":"./react/dist/index.d.ts","react-server":"./react/dist/index.server.mjs","import":"./react/dist/index.mjs","require":"./react/dist/index.js"}},"dependencies":{"@ai-sdk/provider":"1.0.7","@ai-sdk/provider-utils":"2.1.6","@ai-sdk/react":"1.1.10","@ai-sdk/ui-utils":"1.1.10","@opentelemetry/api":"1.9.0","jsondiffpatch":"0.6.0"},"devDependencies":{"@edge-runtime/vm":"^5.0.0","@types/node":"^18","@types/react":"^18","@types/react-dom":"^18","@vercel/ai-tsconfig":"workspace:*","@vitejs/plugin-react":"4.3.3","eslint":"8.57.1","eslint-config-vercel-ai":"workspace:*","react-dom":"^18","react-server-dom-webpack":"18.3.0-canary-eb33bd747-20240312","tsup":"^7.2.0","typescript":"5.6.3","zod":"3.23.8"},"peerDependencies":{"react":"^18 || ^19 || ^19.0.0-rc","zod":"^3.0.0"},"peerDependenciesMeta":{"react":{"optional":true},"zod":{"optional":true}},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"homepage":"https://github.com/brandonhays3/ai#readme","repository":{"type":"git","url":"git+https://github.com/brandonhays3/ai.git"},"bugs":{"url":"https://github.com/brandonhays3/ai/issues"},"keywords":["ai","vercel","react","next","nextjs"],"_id":"@automatenew/ai@4.1.21-fork.1","gitHead":"7121d292275a8080e6471be717a8a7662fbc2b7a","_nodeVersion":"18.20.4","_npmVersion":"10.7.0","dist":{"integrity":"sha512-NLzVmYKwcIW1Vww8UYjXwDjMzw+0rsUrHDiuMGNkcU/LaXRMMljJmV/w/Tqr+8wagPzViam8B4GhlG5Hs/mDqQ==","shasum":"2f26c2e38e19a6e2048fd853a8764d0ebf617161","tarball":"https://registry.npmjs.org/@automatenew/ai/-/ai-4.1.21-fork.1.tgz","fileCount":32,"unpackedSize":1988147,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCNsFm+sWC3V7ucEtWgnQsRo36wNpf2dbjLQTYCTuOa2QIhANQWDb/fK6kxGxGOzmNOJIIceIJCgPGj48XhPswWcUNM"}]},"_npmUser":{"name":"automatenew","email":"accounts@fullpilot.com"},"directories":{},"maintainers":[{"name":"automatenew","email":"accounts@fullpilot.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ai_4.1.21-fork.1_1738776094906_0.5775995818326161"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-05T17:07:35.563Z","modified":"2025-02-05T17:21:35.358Z","4.1.21-fork.0":"2025-02-05T17:07:36.001Z","4.1.21-fork.1":"2025-02-05T17:21:35.162Z"},"bugs":{"url":"https://github.com/brandonhays3/ai/issues"},"license":"Apache-2.0","homepage":"https://github.com/brandonhays3/ai#readme","keywords":["ai","vercel","react","next","nextjs"],"repository":{"type":"git","url":"git+https://github.com/brandonhays3/ai.git"},"description":"Fork of Vercel AI SDK - The AI Toolkit for TypeScript and JavaScript","maintainers":[{"name":"automatenew","email":"accounts@fullpilot.com"}],"readme":"![hero illustration](./assets/hero.gif)\n\n# AI SDK\n\nThe [AI SDK](https://sdk.vercel.ai/docs) is a TypeScript toolkit designed to help you build AI-powered applications using popular frameworks like Next.js, React, Svelte, Vue and runtimes like Node.js.\n\nTo learn more about how to use the AI SDK, check out our [API Reference](https://sdk.vercel.ai/docs/reference) and [Documentation](https://sdk.vercel.ai/docs).\n\n## Installation\n\nYou will need Node.js 18+ and pnpm installed on your local development machine.\n\n```shell\nnpm install ai\n```\n\n## Usage\n\n### AI SDK Core\n\nThe [AI SDK Core](https://sdk.vercel.ai/docs/ai-sdk-core/overview) module provides a unified API to interact with model providers like [OpenAI](https://sdk.vercel.ai/providers/ai-sdk-providers/openai), [Anthropic](https://sdk.vercel.ai/providers/ai-sdk-providers/anthropic), [Google](https://sdk.vercel.ai/providers/ai-sdk-providers/google-generative-ai), and more.\n\nYou will then install the model provider of your choice.\n\n```shell\nnpm install @ai-sdk/openai\n```\n\n###### @/index.ts (Node.js Runtime)\n\n```ts\nimport { generateText } from 'ai';\nimport { openai } from '@ai-sdk/openai'; // Ensure OPENAI_API_KEY environment variable is set\n\nconst { text } = await generateText({\n  model: openai('gpt-4o'),\n  system: 'You are a friendly assistant!',\n  prompt: 'Why is the sky blue?',\n});\n\nconsole.log(text);\n```\n\n### AI SDK UI\n\nThe [AI SDK UI](https://sdk.vercel.ai/docs/ai-sdk-ui/overview) module provides a set of hooks that help you build chatbots and generative user interfaces. These hooks are framework agnostic, so they can be used in Next.js, React, Svelte, Vue, and SolidJS.\n\n###### @/app/page.tsx (Next.js App Router)\n\n```tsx\n'use client';\n\nimport { useChat } from 'ai/react';\n\nexport default function Page() {\n  const { messages, input, handleSubmit, handleInputChange, isLoading } =\n    useChat();\n\n  return (\n    <div>\n      {messages.map(message => (\n        <div key={message.id}>\n          <div>{message.role}</div>\n          <div>{message.content}</div>\n        </div>\n      ))}\n\n      <form onSubmit={handleSubmit}>\n        <input\n          value={input}\n          placeholder=\"Send a message...\"\n          onChange={handleInputChange}\n          disabled={isLoading}\n        />\n      </form>\n    </div>\n  );\n}\n```\n\n###### @/app/api/chat/route.ts (Next.js App Router)\n\n```ts\nimport { streamText } from 'ai';\nimport { openai } from '@ai-sdk/openai';\n\nexport async function POST(req: Request) {\n  const { messages } = await req.json();\n\n  const result = streamText({\n    model: openai('gpt-4o'),\n    system: 'You are a helpful assistant.',\n    messages,\n  });\n\n  return result.toDataStreamResponse();\n}\n```\n\n## Templates\n\nWe've built [templates](https://vercel.com/templates?type=ai) that include AI SDK integrations for different use cases, providers, and frameworks. You can use these templates to get started with your AI-powered application.\n\n## Community\n\nThe AI SDK community can be found on [GitHub Discussions](https://github.com/vercel/ai/discussions) where you can ask questions, voice ideas, and share your projects with other people.\n\n## Contributing\n\nContributions to the AI SDK are welcome and highly appreciated. However, before you jump right into it, we would like you to review our [Contribution Guidelines](https://github.com/vercel/ai/blob/main/CONTRIBUTING.md) to make sure you have smooth experience contributing to AI SDK.\n\n## Authors\n\nThis library is created by [Vercel](https://vercel.com) and [Next.js](https://nextjs.org) team members, with contributions from the [Open Source Community](https://github.com/vercel/ai/graphs/contributors).\n","readmeFilename":"README.md"}