@cobrowser/chatgpt 0.6.1 → 0.6.2

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.
@@ -5,6 +5,7 @@ export declare enum ChatGptRole {
5
5
  }
6
6
  export interface ChatGptRequestBody {
7
7
  model: string;
8
+ response_format?: {};
8
9
  messages: ChatGptMessage[];
9
10
  }
10
11
  interface ChatGptMessage {
@@ -12,7 +12,7 @@ class BaseService {
12
12
  * @param model the main chatGPT model to use
13
13
  * @param maxNumberOfChoices How many chat completion choices to generate for each request.
14
14
  */
15
- constructor(apiUrl, model = 'gpt-3.5-turbo', maxNumberOfChoices = 1) {
15
+ constructor(apiUrl, model = 'gpt-3.5-turbo-1106', maxNumberOfChoices = 1) {
16
16
  Object.defineProperty(this, "request", {
17
17
  enumerable: true,
18
18
  configurable: true,
@@ -44,6 +44,7 @@ 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
+ response_format: { type: "json_object" },
47
48
  messages: [
48
49
  {
49
50
  role: ChatGptMessage_1.ChatGptRole.SYSTEM,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobrowser/chatgpt",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
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": "73d0a4cb7a699a637c81b9ca1cc18eeba20f0ce1"
41
+ "gitHead": "d63bcaa212c0bb8f870479c1e001478d3e578980"
42
42
  }