Skip to content

Commit 67ef515

Browse files
author
Shane Osbourne
committed
updated example
1 parent 8ea4829 commit 67ef515

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

examples/openai/bslive.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,4 @@ servers:
1212
1313
data: {"id":"chatcmpl-98DH53xoEHQ7RhaBF9Djt0GoczbM2","object":"chat.completion.chunk","created":1711744679,"model":"gpt-3.5-turbo-0125","system_fingerprint":"fp_3bc1b5746c","choices":[{"index":0,"delta":{"content":"Thsis"},"logprobs":null,"finish_reason":null}]}
1414
15-
data: {"id":"chatcmpl-98DH53xoEHQ7RhaBF9Djt0GoczbM2","object":"chat.completion.chunk","created":1711744679,"model":"gpt-3.5-turbo-0125","system_fingerprint":"fp_3bc1b5746c","choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}]}
16-
17-
data: {"id":"chatcmpl-98DH53xoEHQ7RhaBF9Djt0GoczbM2","object":"chat.completion.chunk","created":1711744679,"model":"gpt-3.5-turbo-0125","system_fingerprint":"fp_3bc1b5746c","choices":[{"index":0,"delta":{"content":" a"},"logprobs":null,"finish_reason":null}]}
18-
19-
data: {"id":"chatcmpl-98DH53xoEHQ7RhaBF9Djt0GoczbM2","object":"chat.completion.chunk","created":1711744679,"model":"gpt-3.5-turbo-0125","system_fingerprint":"fp_3bc1b5746c","choices":[{"index":0,"delta":{"content":" test"},"logprobs":null,"finish_reason":null}]}
20-
21-
data: {"id":"chatcmpl-98DH53xoEHQ7RhaBF9Djt0GoczbM2","object":"chat.completion.chunk","created":1711744679,"model":"gpt-3.5-turbo-0125","system_fingerprint":"fp_3bc1b5746c","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}]}
22-
23-
data: {"id":"chatcmpl-98DH53xoEHQ7RhaBF9Djt0GoczbM2","object":"chat.completion.chunk","created":1711744679,"model":"gpt-3.5-turbo-0125","system_fingerprint":"fp_3bc1b5746c","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}]}
15+
data: {"id":"chatcmpl-98DH53xoEHQ7RhaBF9Djt0GoczbM2","object":"chat.completion.chunk","created":1711744679,"model":"gpt-3.5-turbo-0125","system_fingerprint":"fp_3bc1b5746c","choices":[{"index":0,"delta":{"content":" is"},"logprobs":null,"finish_reason":null}]}

tests/sse.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test.describe('examples/openai/bslive.yml', {
1111
}, () => {
1212
test('server sent events', async ({page, bs}) => {
1313
await page.goto(bs.path('/'), {waitUntil: 'networkidle'})
14-
await expect(page.locator('#output')).toContainText('"" "Thsis" " is" " a" " test" "." undefined', {timeout: 10000});
14+
await expect(page.locator('#output')).toContainText('"" "Thsis" " is"', {timeout: 10000});
1515
const html = await page.innerHTML('#output');
1616
expect(html).toMatchSnapshot()
1717
});
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
""
22
"Thsis"
33
" is"
4-
" a"
5-
" test"
6-
"."
7-
undefined

0 commit comments

Comments
 (0)