openai-streams
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65108
114