@cobrowser/chatgpt 0.7.15 → 0.7.16
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.
|
@@ -51,7 +51,7 @@ class AssistantService extends BaseService_1.default {
|
|
|
51
51
|
*
|
|
52
52
|
* @param message
|
|
53
53
|
*/
|
|
54
|
-
getReply(message) {
|
|
54
|
+
getReply(message, instructions) {
|
|
55
55
|
var _a;
|
|
56
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
57
57
|
if (!this.assistantId || !this.threadId) {
|
|
@@ -68,7 +68,7 @@ class AssistantService extends BaseService_1.default {
|
|
|
68
68
|
}
|
|
69
69
|
else {
|
|
70
70
|
yield openai.beta.threads.messages.create(this.threadId, { role: "user", content: message });
|
|
71
|
-
run = yield openai.beta.threads.runs.create(this.threadId, { assistant_id: (_a = this.assistantId) !== null && _a !== void 0 ? _a : '' });
|
|
71
|
+
run = yield openai.beta.threads.runs.create(this.threadId, { assistant_id: (_a = this.assistantId) !== null && _a !== void 0 ? _a : '', additional_instructions: instructions });
|
|
72
72
|
}
|
|
73
73
|
while (['queued', 'in_progress', 'cancelling'].includes(run.status)) {
|
|
74
74
|
yield new Promise(resolve => setTimeout(resolve, 500));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cobrowser/chatgpt",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.16",
|
|
4
4
|
"description": "chatgpt services to connect our projects with chatgpt api",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chatgpt",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@cobrowser/logger": "^2.0.2",
|
|
25
25
|
"axios": "^1.6.1",
|
|
26
26
|
"axios-mock-adapter": "^1.22.0",
|
|
27
|
-
"openai": "^4.
|
|
27
|
+
"openai": "^4.52.7"
|
|
28
28
|
},
|
|
29
29
|
"directories": {
|
|
30
30
|
"dist": "dist"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"bugs": {
|
|
40
40
|
"url": "https://bitbucket.org/cobrowser/cb_utils/issues"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "23465cb98f9e2332a7ca4c1ad7cc792aca472a1c"
|
|
43
43
|
}
|