@cobrowser/chatgpt 0.5.9 → 0.6.0

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.
@@ -44,10 +44,16 @@ class TranslationService extends BaseService_1.default {
44
44
  // the body we need to send to the request
45
45
  requestBody = {
46
46
  model: this.chatGptModel,
47
- messages: [{
47
+ messages: [
48
+ {
49
+ role: ChatGptMessage_1.ChatGptRole.SYSTEM,
50
+ content: 'Your a translator that providees a response in JSON format only, the response should be a json having a boolean called error and data which is array of objects, the array of objects will contain objects having translation and translated_message properties',
51
+ },
52
+ {
48
53
  role: ChatGptMessage_1.ChatGptRole.USER,
49
54
  content: translateText,
50
- }],
55
+ }
56
+ ],
51
57
  };
52
58
  try {
53
59
  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.9",
3
+ "version": "0.6.0",
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": "363935cd5da68deaf996f7d91da96035b81f1a5f"
41
+ "gitHead": "df1339b9477e1828f68c3553666ed88c9a3ef198"
42
42
  }