@veryfront/ext-llm-openai 0.1.1197 → 0.1.1198
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai-chat-stream.d.ts","sourceRoot":"","sources":["../src/openai-chat-stream.ts"],"names":[],"mappings":"AA2BA,KAAK,4BAA4B,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,CAAC;AAExE,KAAK,uBAAuB,GAAG;IAC7B,YAAY,CAAC,EAAE,4BAA4B,CAAC;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AASF,eAAO,MAAM,4BAA4B,OAAQ,CAAC;AA4KlD,wBAAuB,2BAA2B,CAChD,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,EAClC,OAAO,GAAE,uBAA4B,GACpC,aAAa,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"openai-chat-stream.d.ts","sourceRoot":"","sources":["../src/openai-chat-stream.ts"],"names":[],"mappings":"AA2BA,KAAK,4BAA4B,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,CAAC;AAExE,KAAK,uBAAuB,GAAG;IAC7B,YAAY,CAAC,EAAE,4BAA4B,CAAC;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AASF,eAAO,MAAM,4BAA4B,OAAQ,CAAC;AA4KlD,wBAAuB,2BAA2B,CAChD,MAAM,EAAE,cAAc,CAAC,UAAU,CAAC,EAClC,OAAO,GAAE,uBAA4B,GACpC,aAAa,CAAC,OAAO,CAAC,CA0UxB"}
|
|
@@ -153,7 +153,6 @@ export async function* streamOpenAICompatibleParts(stream, context = {}) {
|
|
|
153
153
|
let sawChoiceEnvelope = false;
|
|
154
154
|
let sawFinishReason = false;
|
|
155
155
|
let sawDone = false;
|
|
156
|
-
let sawPostFinishUsage = false;
|
|
157
156
|
const toolArgumentBudget = {
|
|
158
157
|
bytes: 0,
|
|
159
158
|
fragments: 0,
|
|
@@ -182,12 +181,6 @@ export async function* streamOpenAICompatibleParts(stream, context = {}) {
|
|
|
182
181
|
if (!usageRecord) {
|
|
183
182
|
throw invalidOpenAIStream(context, "event had neither choices nor usage");
|
|
184
183
|
}
|
|
185
|
-
if (sawFinishReason) {
|
|
186
|
-
if (sawPostFinishUsage) {
|
|
187
|
-
throw invalidOpenAIStream(context, "stream contained multiple post-finish usage events");
|
|
188
|
-
}
|
|
189
|
-
sawPostFinishUsage = true;
|
|
190
|
-
}
|
|
191
184
|
return;
|
|
192
185
|
}
|
|
193
186
|
if (!Array.isArray(record.choices)) {
|
|
@@ -197,12 +190,6 @@ export async function* streamOpenAICompatibleParts(stream, context = {}) {
|
|
|
197
190
|
if (!usageRecord) {
|
|
198
191
|
throw invalidOpenAIStream(context, "empty choices event had no usage");
|
|
199
192
|
}
|
|
200
|
-
if (sawFinishReason) {
|
|
201
|
-
if (sawPostFinishUsage) {
|
|
202
|
-
throw invalidOpenAIStream(context, "stream contained multiple post-finish usage events");
|
|
203
|
-
}
|
|
204
|
-
sawPostFinishUsage = true;
|
|
205
|
-
}
|
|
206
193
|
return;
|
|
207
194
|
}
|
|
208
195
|
if (sawFinishReason) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veryfront/ext-llm-openai",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1198",
|
|
4
4
|
"description": "Veryfront first-party extension package for ext-llm-openai",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"veryfront",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"capabilities": []
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"veryfront": "^0.1.
|
|
48
|
+
"veryfront": "^0.1.1198"
|
|
49
49
|
},
|
|
50
50
|
"type": "module",
|
|
51
51
|
"types": "./esm/index.d.ts",
|