Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners-nr committed Nov 20, 2023
1 parent 8e1b026 commit 8b78e8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/lib/openai-mock-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ function handler(req, res) {
const outStream = new Readable({
read() {
if (i < parts.length) {
const content = (parts.length - 1) === i ? parts[i] : `${parts[i]} `

Check failure on line 83 in test/lib/openai-mock-server.js

View workflow job for this annotation

GitHub Actions / lint (lts/*)

Replace `(parts.length·-·1)` with `parts.length·-·1`
const chunk = JSON.stringify({
id: 'chatcmpl-8MzOfSMbLxEy70lYAolSwdCzfguQZ',
object: 'chat.completion.chunk',
Expand All @@ -90,7 +91,7 @@ function handler(req, res) {
{
index: 0,
finish_reason: null,
delta: { role: 'assistant', content: parts[i] }
delta: { role: 'assistant', content }
}
]
})
Expand Down

0 comments on commit 8b78e8a

Please sign in to comment.