Skip to content

Commit

Permalink
refactor: use createTextEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
francisfuzz committed Sep 20, 2024
1 parent ecf55b9 commit fe53059
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@

/** @type {import('..').CreateAckEventInterface} */
export function createAckEvent() {
const data = {
choices: [
{
index: 0,
delta: { content: ``, role: "assistant" },
},
],
};
return `data: ${JSON.stringify(data)}\n\n`;
return createTextEvent("");
}

/** @type {import('..').CreateTextEventInterface} */
Expand Down

0 comments on commit fe53059

Please sign in to comment.