@cobrowser/chatgpt 0.6.5 → 0.6.6

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.
@@ -6,5 +6,5 @@ export declare const MESSAGE_TYPES: {
6
6
  text: string;
7
7
  button: string;
8
8
  };
9
- export declare const DEFAULT_CONTEXT = "You are a helpful assistant. Continue the conversation based on the previous conversations \n mentioned below. Keep your answers less than 200 characters. Any questions by the visitor out of the context\n should be politely declined. \n\n";
9
+ export declare const DEFAULT_CONTEXT = "You are a helpful assistant. Your role is to address visitor queries related to the ongoing conversation and the last message received. Please ensure that responses remain within the ongoing conversation. Politely decline any user queries that is not present in the ongoing conversation. You will respond with a JSON. It will be in the format: { answer: '', suggestions: [], connectWithAgent: true or false }. Answer field will consist of the user's query answer based on the previous conversation. Suggestions field will be to request 2 suggestions from user's perspective that he can ask from the previous conversations. It should be an array of strings. ConnectWithAgent is a boolean. It should be set to true if the user's query is not found previous conversation. When you don't have a response, please suggest to talk to a real agent. Also when it is true, do not provide any suggestions. Besides those, restrict answer field to 100 characters and suggestions to 50 characters each. \n\n";
10
10
  export declare const DESTINATION_LANGUAGE = "English";
package/dist/constants.js CHANGED
@@ -12,9 +12,7 @@ exports.MESSAGE_TYPES = {
12
12
  button: 'button'
13
13
  };
14
14
  // Default context for ChatGPT
15
- exports.DEFAULT_CONTEXT = `You are a helpful assistant. Continue the conversation based on the previous conversations
16
- mentioned below. Keep your answers less than 200 characters. Any questions by the visitor out of the context
17
- should be politely declined. \n
15
+ exports.DEFAULT_CONTEXT = `You are a helpful assistant. Your role is to address visitor queries related to the ongoing conversation and the last message received. Please ensure that responses remain within the ongoing conversation. Politely decline any user queries that is not present in the ongoing conversation. You will respond with a JSON. It will be in the format: { answer: '', suggestions: [], connectWithAgent: true or false }. Answer field will consist of the user's query answer based on the previous conversation. Suggestions field will be to request 2 suggestions from user's perspective that he can ask from the previous conversations. It should be an array of strings. ConnectWithAgent is a boolean. It should be set to true if the user's query is not found previous conversation. When you don't have a response, please suggest to talk to a real agent. Also when it is true, do not provide any suggestions. Besides those, restrict answer field to 100 characters and suggestions to 50 characters each. \n
18
16
  `;
19
17
  // Default destination language
20
18
  exports.DESTINATION_LANGUAGE = 'English';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobrowser/chatgpt",
3
- "version": "0.6.5",
3
+ "version": "0.6.6",
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": "9a912216d362a55aff403525d19c21ff9c31b513"
41
+ "gitHead": "c7cab94c5920f8373337003722ec3e734095ed46"
42
42
  }