Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openai-streams

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openai-streams - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

package.json
{
"name": "openai-streams",
"description": "Tools for working with OpenAI streams in Node.js and TypeScript.",
"version": "2.0.0",
"version": "2.0.1",
"license": "MIT",

@@ -6,0 +6,0 @@ "type": "module",

@@ -66,3 +66,3 @@ # OpenAI Streams

model: "text-davinci-003",
prompt: "Write a sentence.\n\n",
prompt: "Write a happy sentence.\n\n",
max_tokens: 100

@@ -87,5 +87,6 @@ },

```ts
import type { NextApiRequest, NextApiResponse } from "next";
import { OpenAI } from "openai-streams/node";
export default async function handler() {
export default async function test (_: NextApiRequest, res: NextApiResponse) {
const stream = await OpenAI(

@@ -95,5 +96,5 @@ "completions",

model: "text-davinci-003",
prompt: "Write a sentence.\n\n",
max_tokens: 100
},
prompt: "Write a happy sentence.\n\n",
max_tokens: 25
}
);

@@ -100,0 +101,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc