{"_id":"@ai-toolkit/openai","name":"@ai-toolkit/openai","dist-tags":{"latest":"1.2.1"},"versions":{"1.2.1":{"name":"@ai-toolkit/openai","version":"1.2.1","license":"Apache-2.0","sideEffects":false,"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./internal":{"types":"./internal/dist/index.d.ts","import":"./internal/dist/index.mjs","module":"./internal/dist/index.mjs","require":"./internal/dist/index.js"}},"dependencies":{"@ai-toolkit/provider":"1.0.10","@ai-toolkit/provider-utils":"2.1.11"},"devDependencies":{"@types/node":"^18","tsup":"^8","typescript":"5.6.3","zod":"3.23.8","@khulnasoft/ai-tsconfig":"0.0.0"},"peerDependencies":{"zod":"^3.0.0"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"homepage":"https://sdk.khulnasoft.com/docs","repository":{"type":"git","url":"git+https://github.com/khulnasoft/ai-toolkit.git"},"bugs":{"url":"https://github.com/khulnasoft/ai-toolkit/issues"},"keywords":["ai-toolkit"],"scripts":{"build":"tsup","build:watch":"tsup --watch","clean":"rm -rf dist && rm -rf internal/dist","lint":"eslint \"./**/*.ts*\"","type-check":"tsc --noEmit","prettier-check":"prettier --check \"./**/*.ts*\"","test":"pnpm test:node && pnpm test:edge","test:edge":"vitest --config vitest.edge.config.js --run","test:node":"vitest --config vitest.node.config.js --run"},"_id":"@ai-toolkit/openai@1.2.1","description":"The **[OpenAI provider](https://sdk.khulnasoft.com/providers/ai-toolkit-providers/openai)** for the [AI TOOLKIT](https://sdk.khulnasoft.com/docs) contains language model support for the OpenAI chat and completion APIs and embedding model support for the O","_integrity":"sha512-P4c2rMIsPJxOYxsOR/Tzqp1AgS9d+3M+sbCJpN4mdcPinns8sJoIwF1bdlkNKDN/hPm3xyWzivOz0LTnBf4U4Q==","_resolved":"/tmp/8ff7c3057d0ec754e7d7e166b17442c3/ai-toolkit-openai-1.2.1.tgz","_from":"file:ai-toolkit-openai-1.2.1.tgz","_nodeVersion":"22.13.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-P4c2rMIsPJxOYxsOR/Tzqp1AgS9d+3M+sbCJpN4mdcPinns8sJoIwF1bdlkNKDN/hPm3xyWzivOz0LTnBf4U4Q==","shasum":"600b47fb51a840ff56a066d8678d1deeda33205c","tarball":"https://registry.npmjs.org/@ai-toolkit/openai/-/openai-1.2.1.tgz","fileCount":15,"unpackedSize":671402,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCMDsMJ4wpfSAUJO50vIM86kqk4o80BhFgyb2MmmthGtgIgDwmROzKoZorOrnWP78kEJqGbxng72iwzZIyjSiFfHII="}]},"_npmUser":{"name":"khulnasoft-lab","email":"iconmamundentist@gmail.com"},"directories":{},"maintainers":[{"name":"khulnasoft-lab","email":"iconmamundentist@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/openai_1.2.1_1741546717643_0.235237383538764"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-09T18:58:37.557Z","1.2.1":"2025-03-09T18:58:37.866Z","modified":"2025-03-09T18:58:38.137Z"},"maintainers":[{"name":"khulnasoft-lab","email":"iconmamundentist@gmail.com"}],"description":"The **[OpenAI provider](https://sdk.khulnasoft.com/providers/ai-toolkit-providers/openai)** for the [AI TOOLKIT](https://sdk.khulnasoft.com/docs) contains language model support for the OpenAI chat and completion APIs and embedding model support for the O","homepage":"https://sdk.khulnasoft.com/docs","keywords":["ai-toolkit"],"repository":{"type":"git","url":"git+https://github.com/khulnasoft/ai-toolkit.git"},"bugs":{"url":"https://github.com/khulnasoft/ai-toolkit/issues"},"license":"Apache-2.0","readme":"# AI TOOLKIT - OpenAI Provider\n\nThe **[OpenAI provider](https://sdk.khulnasoft.com/providers/ai-toolkit-providers/openai)** for the [AI TOOLKIT](https://sdk.khulnasoft.com/docs)\ncontains language model support for the OpenAI chat and completion APIs and embedding model support for the OpenAI embeddings API.\n\n## Setup\n\nThe OpenAI provider is available in the `@ai-toolkit/openai` module. You can install it with\n\n```bash\nnpm i @ai-toolkit/openai\n```\n\n## Provider Instance\n\nYou can import the default provider instance `openai` from `@ai-toolkit/openai`:\n\n```ts\nimport { openai } from '@ai-toolkit/openai';\n```\n\n## Example\n\n```ts\nimport { openai } from '@ai-toolkit/openai';\nimport { generateText } from 'ai-toolkit';\n\nconst { text } = await generateText({\n  model: openai('gpt-4-turbo'),\n  prompt: 'Write a vegetarian lasagna recipe for 4 people.',\n});\n```\n\n## Documentation\n\nPlease check out the **[OpenAI provider documentation](https://sdk.khulnasoft.com/providers/ai-toolkit-providers/openai)** for more information.\n","readmeFilename":"README.md","_rev":"1-e120600c06300e3fbaeb1165a624dba6"}