@cobrowser/chatgpt 0.5.8 → 0.5.9

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.
@@ -75,10 +75,16 @@ class TranslationService extends BaseService_1.default {
75
75
  // the body we need to send to the request
76
76
  requestBody = {
77
77
  model: this.chatGptModel,
78
- messages: [{
78
+ messages: [
79
+ {
80
+ role: ChatGptMessage_1.ChatGptRole.SYSTEM,
81
+ content: 'Your a translator that providees a response in JSON format only, a JSON that contains languageCode and isError if you cannot detect the language',
82
+ },
83
+ {
79
84
  role: ChatGptMessage_1.ChatGptRole.USER,
80
85
  content: translateText,
81
- }],
86
+ }
87
+ ],
82
88
  };
83
89
  try {
84
90
  const response = yield this.request.post('', requestBody);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobrowser/chatgpt",
3
- "version": "0.5.8",
3
+ "version": "0.5.9",
4
4
  "description": "chatgpt services to connect our projects with chatgpt api",
5
5
  "keywords": [
6
6
  "chatgpt",
@@ -38,5 +38,5 @@
38
38
  "bugs": {
39
39
  "url": "https://bitbucket.org/cobrowser/cb_utils/issues"
40
40
  },
41
- "gitHead": "6005d31fd611bbf65652f276593e6a5a8eb036e6"
41
+ "gitHead": "363935cd5da68deaf996f7d91da96035b81f1a5f"
42
42
  }