Spaces:
Paused
Paused
djmuted
commited on
Commit
·
fb8d072
1
Parent(s):
05b4e0f
Remove export
Browse files- src/utils.js +2 -2
src/utils.js
CHANGED
@@ -113,7 +113,7 @@ function createBaseForm() {
|
|
113 |
// Add the utility functions here
|
114 |
// e.g. escapePrompt, readBody, preparePrompt, currentTime, headers, convertToUnixTime, createBaseForm
|
115 |
|
116 |
-
|
117 |
data,
|
118 |
promptTokens,
|
119 |
completionTokens,
|
@@ -133,7 +133,7 @@ export const dataToResponse = (
|
|
133 |
},
|
134 |
],
|
135 |
created: currDate.getTime(),
|
136 |
-
id:
|
137 |
object: 'chat.completion.chunk',
|
138 |
usage: {
|
139 |
prompt_tokens: promptTokens,
|
|
|
113 |
// Add the utility functions here
|
114 |
// e.g. escapePrompt, readBody, preparePrompt, currentTime, headers, convertToUnixTime, createBaseForm
|
115 |
|
116 |
+
const dataToResponse = (
|
117 |
data,
|
118 |
promptTokens,
|
119 |
completionTokens,
|
|
|
133 |
},
|
134 |
],
|
135 |
created: currDate.getTime(),
|
136 |
+
id: `chatcmpl-${(Math.random().toString(36).slice(2))}`,
|
137 |
object: 'chat.completion.chunk',
|
138 |
usage: {
|
139 |
prompt_tokens: promptTokens,
|