{"_id":"@voiceflow/openai","_rev":"70-c614e5a493f0ef234be880ae645c187a","name":"@voiceflow/openai","dist-tags":{"latest":"3.2.4"},"versions":{"3.2.1":{"name":"@voiceflow/openai","version":"3.2.1","keywords":["azure-openai","openai","open","ai","gpt-3","gpt3"],"author":{"name":"Voiceflow"},"license":"MIT","_id":"@voiceflow/openai@3.2.1","maintainers":[{"name":"ninabondar","email":"nina.bondar.cs@gmail.com"},{"name":"yoyotruly","email":"yoyo.truly@gmail.com"},{"name":"matthewnaik","email":"matthewnaik@gmail.com"},{"name":"edison-vflow","email":"edison.mukadah@voiceflow.com"},{"name":"shelone.grantwatson","email":"shelone.grantwatson@voiceflow.com"},{"name":"xavientois","email":"josh.rampersad@voiceflow.com"},{"name":"zhilight","email":"brennan.lu@voiceflow.com"},{"name":"amandasteinhauer","email":"amanda.steinhauer@protonmail.com"},{"name":"pmvrmc","email":"pedromatosdecarvalho@gmail.com"},{"name":"filipemerker","email":"filipesmerker@gmail.com"},{"name":"viniciusdacal","email":"viniciusldacal@gmail.com"},{"name":"trs","email":"npm@tylerstewart.ca"},{"name":"matheuspoleza","email":"matheus.poleza@gmail.com"},{"name":"denyslinkov","email":"denys.linkov@voiceflow.com"},{"name":"andrewlawrence","email":"andrew@voiceflow.com"},{"name":"tylerhhan","email":"tyler@voiceflow.com"},{"name":"frankgu968","email":"frank@voiceflow.com"},{"name":"effervescentia","email":"ben.l.teichman@gmail.com"},{"name":"josh_vf","email":"josh@voiceflow.com"},{"name":"voiceflow-gallagan","email":"nicolas@voiceflow.com"},{"name":"z4o4z","email":"overhawlin@gmail.com"},{"name":"xavidop","email":"xavierportillaedo@gmail.com"},{"name":"vf-serviceaccount","email":"serviceaccount@voiceflow.com"},{"name":"jonahsnider","email":"jonah@jonah.pw"}],"contributors":[{"name":"OpenAI"},{"name":"Unique AG"},{"name":"Voiceflow"}],"homepage":"https://github.com/voiceflow/openai#readme","bugs":{"url":"https://github.com/voiceflow/openai/issues"},"dist":{"shasum":"cdd9cd38c0184b87558dbf32873ea930b0670997","tarball":"https://registry.npmjs.org/@voiceflow/openai/-/openai-3.2.1.tgz","fileCount":27,"integrity":"sha512-u7WFV1R3vn7/m/cTPYIIjMh2VxPMgr4upN4eO1DK6ElmrAQOYScz08nEJLPNevIOgSey4UB3EZucVTTQuVoLXg==","signatures":[{"sig":"MEUCIFqb/bkah3IAwmtpQNzVfPcQ77M05LjR/oFlq74BqrKwAiEAjDbcGonKH/M7JW+PHkTpgwnc3byou/oaeB6ROPbAHpo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":483212},"main":"./dist/index.js","types":"./dist/index.d.ts","gitHead":"13c80529b3055b688e9bc538015ee165fd2dc080","scripts":{"build":"tsc --outDir dist/"},"_npmUser":{"name":"tylerhhan","email":"tyler@voiceflow.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+ssh://git@github.com/voiceflow/openai.git","type":"git"},"_npmVersion":"8.15.0","description":"Node.js library for the Azure OpenAI API, forked from the official node package.","directories":{},"_nodeVersion":"16.17.0","dependencies":{"axios":"^0.26.0","form-data":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^3.6.4","@types/node":"^12.11.5"},"_npmOperationalInternal":{"tmp":"tmp/openai_3.2.1_1685382925951_0.43446896313350325","host":"s3://npm-registry-packages"}},"3.2.4":{"name":"@voiceflow/openai","version":"3.2.4","keywords":["azure-openai","openai","open","ai","gpt-3","gpt3"],"author":{"name":"Voiceflow"},"license":"MIT","_id":"@voiceflow/openai@3.2.4","maintainers":[{"name":"pmvrmc","email":"pedromatosdecarvalho@gmail.com"},{"name":"amandasteinhauer","email":"amanda.steinhauer@protonmail.com"},{"name":"andrewlawrence","email":"andrew@voiceflow.com"},{"name":"tylerhhan","email":"tyler@voiceflow.com"},{"name":"effervescentia","email":"ben.l.teichman@gmail.com"},{"name":"josh_vf","email":"josh@voiceflow.com"},{"name":"voiceflow-gallagan","email":"nicolas@voiceflow.com"},{"name":"z4o4z","email":"overhawlin@gmail.com"},{"name":"sssoflyyy","email":"andrew.zaitsev.crtr@gmail.com"},{"name":"xavidop","email":"xavierportillaedo@gmail.com"},{"name":"vf-serviceaccount","email":"serviceaccount@voiceflow.com"},{"name":"zhilight","email":"brennan.lu@voiceflow.com"},{"name":"trs","email":"npm@tylerstewart.ca"},{"name":"ytolun","email":"tolunyuksel@gmail.com"},{"name":"sanasarjanjughazyan","email":"sanasar.janjughazyan@gmail.com"},{"name":"ose-voiceflow","email":"osegbemoh.dania@voiceflow.com"},{"name":"dandonovan78","email":"dan@wattcode.io"},{"name":"theprof","email":"theprof@gerggle.com"},{"name":"abuyak","email":"artsem.buyak@voiceflow.com"},{"name":"ninabondar","email":"nina.bondar.cs@gmail.com"},{"name":"jbydeley","email":"npm@bydeley.ca"},{"name":"chidi-voiceflow","email":"chidinma.umenwofornweze@voiceflow.com"},{"name":"pateriack","email":"patceidt@gmail.com"},{"name":"arjunsehgal-vf","email":"arjun.sehgal@voiceflow.com"},{"name":"rohan-mandhotra-vf","email":"rohan.mandhotra@voiceflow.com"},{"name":"mackenzieleu","email":"mackenzie.leu@voiceflow.com"},{"name":"devinabaghmar","email":"devina.baghmar@voiceflow.com"}],"contributors":[{"name":"OpenAI"},{"name":"Unique AG"},{"name":"Voiceflow"}],"homepage":"https://github.com/voiceflow/openai#readme","bugs":{"url":"https://github.com/voiceflow/openai/issues"},"dist":{"shasum":"02579ebe09eb408f7f20db7db7a513fd0eb059c2","tarball":"https://registry.npmjs.org/@voiceflow/openai/-/openai-3.2.4.tgz","fileCount":33,"integrity":"sha512-CJ0G7JRL8ZD1dw89IJnk3/T1TfBLbGQXm0VtC9NjV6XE9LxqFAwP5UKKoiGzdXFj7jfOWbuc3JIj2YSRDHyi8w==","signatures":[{"sig":"MEYCIQDAQVoTrCJ4MZpTVVdf5377YEP9JE4ptqrWikFA+KtXzQIhAJB+VKm5D1nPoq8l3AyTbFKuVTkfiqAaEb5Jvf09/JL7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":483212},"main":"./dist/index.js","_from":"file:scratch/openai-3.2.4.tgz","types":"./dist/index.d.ts","scripts":{"build":"tsc --outDir dist/"},"_npmUser":{"name":"effervescentia","email":"ben.l.teichman@gmail.com"},"_resolved":"/Users/benteichman/development/voiceflow/malware/scratch/openai-3.2.4.tgz","_integrity":"sha512-CJ0G7JRL8ZD1dw89IJnk3/T1TfBLbGQXm0VtC9NjV6XE9LxqFAwP5UKKoiGzdXFj7jfOWbuc3JIj2YSRDHyi8w==","deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+ssh://git@github.com/voiceflow/openai.git","type":"git"},"_npmVersion":"10.9.2","description":"Node.js library for the Azure OpenAI API, forked from the official node package.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"axios":"^0.26.0","form-data":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^3.6.4","@types/node":"^12.11.5"},"_npmOperationalInternal":{"tmp":"tmp/openai_3.2.4_1764021920230_0.9318104013934541","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2023-05-29T17:55:25.950Z","modified":"2026-08-12T17:19:09.978Z","3.2.1":"2023-05-29T17:55:26.175Z","3.2.2":"2025-11-24T11:18:34.808Z","3.2.3":"2025-11-24T11:20:11.655Z","3.2.4":"2025-11-24T22:05:20.456Z"},"bugs":{"url":"https://github.com/voiceflow/openai/issues"},"author":{"name":"Voiceflow"},"license":"MIT","homepage":"https://github.com/voiceflow/openai#readme","keywords":["azure-openai","openai","open","ai","gpt-3","gpt3"],"repository":{"url":"git+ssh://git@github.com/voiceflow/openai.git","type":"git"},"description":"Node.js library for the Azure OpenAI API, forked from the official node package.","contributors":[{"name":"OpenAI"},{"name":"Unique AG"},{"name":"Voiceflow"}],"maintainers":[{"email":"pedromatosdecarvalho@gmail.com","name":"pmvrmc"},{"email":"amanda.steinhauer@protonmail.com","name":"amandasteinhauer"},{"email":"andrew@voiceflow.com","name":"andrewlawrence"},{"email":"tyler@voiceflow.com","name":"tylerhhan"},{"email":"ben.l.teichman@gmail.com","name":"effervescentia"},{"email":"josh@voiceflow.com","name":"josh_vf"},{"email":"nicolas@voiceflow.com","name":"voiceflow-gallagan"},{"email":"overhawlin@gmail.com","name":"z4o4z"},{"email":"andrew.zaitsev.crtr@gmail.com","name":"sssoflyyy"},{"email":"xavierportillaedo@gmail.com","name":"xavidop"},{"email":"tolunyuksel@gmail.com","name":"ytolun"},{"email":"sanasar.janjughazyan@gmail.com","name":"sanasarjanjughazyan"},{"email":"dan@wattcode.io","name":"dandonovan78"},{"email":"theprof@gerggle.com","name":"theprof"},{"email":"artsem.buyak@voiceflow.com","name":"abuyak"},{"email":"nina.bondar.cs@gmail.com","name":"ninabondar"},{"email":"michael.hood@voiceflow.com","name":"pixelzar"},{"email":"rohan.mandhotra@voiceflow.com","name":"rohan-mandhotra-vf"},{"email":"osegbemoh.dania@voiceflow.com","name":"ose-voiceflow"},{"email":"braden.ream@voiceflow.com","name":"bream"},{"email":"npm@bydeley.ca","name":"jbydeley"},{"email":"serviceaccount@voiceflow.com","name":"vf-serviceaccount"},{"email":"peter.isaacs@voiceflow.com","name":"peterisaacs-vf"},{"email":"chidinma.umenwofornweze@voiceflow.com","name":"chidi-voiceflow"},{"email":"patceidt@gmail.com","name":"pateriack"},{"email":"devina.baghmar@voiceflow.com","name":"devinabaghmar"}],"readme":"# Azure OpenAI NodeJS Library\n\nThis is a fork of the official [OpenAI Node.js library](https://github.com/openai/openai-node) that has been adapted to support the Azure OpenAI API. The objective of this library is to minimize the changes required to migrate from the official OpenAI library to Azure OpenAI or revert back to OpenAI.\n\n> **Note**\n> It is also an inofficial fork of [1openwindow/azure-openai-node](https://github.com/1openwindow/azure-openai-node) which we could not use due to due diligence reasons 🥇 \n\nThis library allows you to use Azure OpenAI's API without making any changes to your existing OpenAI code. You can simply add Azure information to your configuration and start using the Azure OpenAI model.\n\n## Installation\n\n```bash\n$ npm install @unique-ag/openai\n```\n\n## Usage\n\nThe library must be configured with your Azure OpenAI's `key`, `endpoint`, and `deploymentId`. You can obtain these credentials from [Azure Portal](https://portal.azure.com).\n\n```ts\nimport { Configuration, OpenAIApi } from '@unique-ag/openai';\n\nconst configuration = new Configuration({\n  apiKey: process.env.OPENAI_API_KEY,\n});\n\nconst openai = new OpenAIApi(\n  new Configuration({\n    apiKey: this.apiKey,\n    // add azure info into configuration\n    azure: {\n      apiKey: <key1>\n      endpoint: <endpoint>,\n    // The `deploymentName` parameter is optional; if you do not set it, you need to put it in the request parameter\n      deploymentName: <model-deployment-name>,\n      apiVerison: '2023-03-15-preview' // or other version\n    }\n  )\n);\n\nconst completion = await openai.createCompletion({\n  model: \"text-davinci-003\",\n  prompt: \"Hello world\",\n});\n\nconsole.log(completion.data.choices[0].text);\n\n```\n\n## Variations\n### Streaming\nAzure OpenAI does not response delta data, so you need to change the response to text\n```ts\n// before: const delta = parsed.choices[0].delta.content;\nconst delta = parsed.choices[0].text;\n```\n\n### Deployment name\n```ts\nconst response = await this.openAiApi.createCompletion({\n  model: <deployement>,\n  prompt: prompt,\n  maxTokens: 100,\n  temperature: 0.9,\n  topP: 1,\n  presencePenalty: 0,\n  frequencyPenalty: 0,\n  bestOf: 1,\n});\n```\n\n## Releases\n\nThis library follows the versioning and releases of the official OpenAI node library.","readmeFilename":"README.md"}