@cobrowser/chatgpt 0.5.9 → 0.6.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.
|
@@ -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, each object will have translation property which will hold the translation of the message and the translated_message property will contain the the original message before being translated',
|
|
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.
|
|
3
|
+
"version": "0.6.1",
|
|
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": "
|
|
41
|
+
"gitHead": "73d0a4cb7a699a637c81b9ca1cc18eeba20f0ce1"
|
|
42
42
|
}
|