1.0.2
Get OpenAI chat response in real-time.
Repository
Current version released
2 years ago
Dependencies
std
Versions
openai-chat-stream
Get OpenAI chat response in real-time.
Usage:
import { getCompletionStream } from "https://deno.land/x/openai_chat_stream/mod.ts";
const stream = getCompletionStream({
apiKey: "YOUR_OPENAI_API_KEY",
messages: [
{
role: "user",
content: "How is Deno vs Node.js?",
},
],
});
for await (const token of stream) {
console.info(token);
}