Skip to content

Commit

Permalink
chunkContent
Browse files Browse the repository at this point in the history
  • Loading branch information
aboutphilippe committed Sep 6, 2024
1 parent 4b0af0a commit a66c4e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion openai/functions/chat/completionsStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,9 @@ export async function openaiChatCompletionsStream({
if (response.length) {
const input: StreamEvent = {
chunkId: chunk.id,
assistantName,
chunkContent: content,
response,
assistantName,
isLast: finishReason === "stop",
};
if (streamEvent) {
Expand Down
2 changes: 1 addition & 1 deletion openai/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@restackio/integrations-openai",
"version": "0.0.14",
"version": "0.0.15",
"main": "dist/service.js",
"types": "dist/service.d.ts",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion openai/types/events.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import OpenAI from "openai/index";

export type StreamEvent = {
chunkId: string;
chunkId?: string;
chunkContent?: string;
response: string;
assistantName?: string;
isLast: boolean;
Expand Down

0 comments on commit a66c4e8

Please sign in to comment.