File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,11 @@ import { sleep, check } from 'k6'
11
11
const staging = 'http://gptwrapper.toska.svc.cluster.local:8000/api/ai/stream'
12
12
const local = 'http://172.17.0.1:3000/api//ai/stream'
13
13
14
- const vusit = 1
14
+ const vusit = 50
15
15
16
16
export const options = {
17
17
vus : vusit ,
18
18
iterations : vusit ,
19
- // duration: "1s",
20
19
}
21
20
22
21
const headerParams = {
@@ -46,7 +45,6 @@ const data = {
46
45
}
47
46
48
47
function handleTokens ( tokenizedStr ) {
49
- // Collect all .text fields into an array
50
48
let texts = [ ]
51
49
let responseId = ''
52
50
@@ -59,12 +57,12 @@ function handleTokens(tokenizedStr) {
59
57
if ( parsedLine . text ) texts . push ( parsedLine . text )
60
58
if ( parsedLine . prevResponseId ) responseId = parsedLine . prevResponseId
61
59
} catch {
62
- // ignore parse errors
60
+ console . log ( '📌 error parsing line' )
63
61
}
64
62
} )
65
63
66
64
const response = texts
67
- . join ( '' ) // join all text fragments
65
+ . join ( '' )
68
66
. replace ( / \n + / g, ' ' )
69
67
. replace ( / \s { 2 , } / g, ' ' )
70
68
. trim ( )
You can’t perform that action at this time.
0 commit comments