@cobrowser/chatgpt 0.7.32-dev.0 → 0.7.32-dev.1

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.
@@ -221,7 +221,7 @@ class CopilotService extends BaseService_1.default {
221
221
  if (assistantMessages.length) {
222
222
  const text = assistantMessages.flatMap((m) => { var _a, _b; return ((_b = (_a = m.content) === null || _a === void 0 ? void 0 : _a.filter((c) => c.type === 'output_text')) === null || _b === void 0 ? void 0 : _b.map((c) => c.text)) || []; });
223
223
  return {
224
- firstChoice: text.pop(),
224
+ firstChoice: JSON.stringify([text.pop()]),
225
225
  threadId: this.conversationId,
226
226
  usageTokens: {
227
227
  prompt_tokens: Number((_c = ((_b = response.usage) === null || _b === void 0 ? void 0 : _b.prompt_tokens)) !== null && _c !== void 0 ? _c : 0),
@@ -232,7 +232,7 @@ class CopilotService extends BaseService_1.default {
232
232
  }
233
233
  if (response.output_text) {
234
234
  return {
235
- firstChoice: response.output_text,
235
+ firstChoice: JSON.stringify([response.output_text]),
236
236
  threadId: this.conversationId,
237
237
  usageTokens: {
238
238
  prompt_tokens: Number((_j = ((_h = response.usage) === null || _h === void 0 ? void 0 : _h.prompt_tokens)) !== null && _j !== void 0 ? _j : 0),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobrowser/chatgpt",
3
- "version": "0.7.32-dev.0",
3
+ "version": "0.7.32-dev.1",
4
4
  "description": "chatgpt services to connect our projects with chatgpt api",
5
5
  "keywords": [
6
6
  "chatgpt",
@@ -39,5 +39,5 @@
39
39
  "bugs": {
40
40
  "url": "https://bitbucket.org/cobrowser/cb_utils/issues"
41
41
  },
42
- "gitHead": "246db1800e2c2238ae01d99a69c971fe6ecd4795"
42
+ "gitHead": "c957b03c571a10f77b380ca9c400eeb2eac9764e"
43
43
  }