@cobrowser/chatgpt 0.7.33 → 0.7.34
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.
|
@@ -10,4 +10,4 @@ export declare const DEFAULT_PROMPT = "\n You are a helpful assistant. Your rol
|
|
|
10
10
|
export declare const DESTINATION_LANGUAGE = "English";
|
|
11
11
|
export declare const LANGUAGE_DETECTION_SYSTEM_ROLE = "\n You are a language detection assistant. Your task is to analyze short text input and determine \n its language using ISO language code. Respond only in JSON format with two key-value pairs: \n - 'languageCode': the detected language's ISO code (or undefined if detection fails).\n - 'isError': a boolean value (true if detection fails, false otherwise).\n";
|
|
12
12
|
export declare const WORD_FREQUENCY_LANGUAGE_DETECTION_SYSTEM_ROLE = "\n You are a language detection assistant. Your task is to analyze the most frequently occurring words in the given text \n and determine the language based on those words. Respond only in JSON format with two key-value pairs: \n - 'languageCode': the detected language's ISO code (or undefined if detection fails).\n - 'isError': a boolean value (true if detection fails, false otherwise).\n";
|
|
13
|
-
export declare const TRANSLATION_SYSTEM_ROLE = "\n You are a translator that responds exclusively in JSON format. Your response must be a JSON object containing:\n - 'translations': it is an array of objects. Each object in the array must contain:\n - 'original': The original input message before translation.\n - 'translation: The translated version of 'original', ensuring it is natural, culturally appropriate, and commonly used by native speakers
|
|
13
|
+
export declare const TRANSLATION_SYSTEM_ROLE = "\n You are a translator that responds exclusively in JSON format. Your response must be a JSON object containing:\n - 'translations': it is an array of objects. Each object in the array must contain:\n - 'original': The original input message before translation.\n - 'translation: The translated version of 'original', ensuring it is natural, culturally appropriate, and commonly used by native speakers.\n - 'isError': a boolean value (true if translation fails, false otherwise).\n\n **You MUST return the JSON format even if you fail to translate the text. In this case, translations field will be empty array and isError should be true.** \n\n Ensure that 'translation' accurately represents the meaning of 'original' while considering cultural nuances, usual expressions, and natural phrasing in the target language.\n\n Do not translate commonly known Latin phrases or expressions (e.g., 'de facto', 'bona fide') when they appear mid-sentence in another language. Leave them exactly as they \n appear in the original text.\n\n Your response must follow this structure strictly.\n";
|
package/dist/utils/constants.js
CHANGED
|
@@ -55,12 +55,12 @@ exports.TRANSLATION_SYSTEM_ROLE = `
|
|
|
55
55
|
You are a translator that responds exclusively in JSON format. Your response must be a JSON object containing:
|
|
56
56
|
- 'translations': it is an array of objects. Each object in the array must contain:
|
|
57
57
|
- 'original': The original input message before translation.
|
|
58
|
-
- 'translation: The translated version of 'original', ensuring it is natural, culturally appropriate, and commonly used by native speakers.
|
|
58
|
+
- 'translation: The translated version of 'original', ensuring it is natural, culturally appropriate, and commonly used by native speakers.
|
|
59
59
|
- 'isError': a boolean value (true if translation fails, false otherwise).
|
|
60
60
|
|
|
61
61
|
**You MUST return the JSON format even if you fail to translate the text. In this case, translations field will be empty array and isError should be true.**
|
|
62
62
|
|
|
63
|
-
Ensure that 'translation' accurately represents the meaning of 'original' while considering
|
|
63
|
+
Ensure that 'translation' accurately represents the meaning of 'original' while considering cultural nuances, usual expressions, and natural phrasing in the target language.
|
|
64
64
|
|
|
65
65
|
Do not translate commonly known Latin phrases or expressions (e.g., 'de facto', 'bona fide') when they appear mid-sentence in another language. Leave them exactly as they
|
|
66
66
|
appear in the original text.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cobrowser/chatgpt",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.34",
|
|
4
4
|
"description": "chatgpt services to connect our projects with chatgpt api",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chatgpt",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"bugs": {
|
|
41
41
|
"url": "https://bitbucket.org/cobrowser/cb_utils/issues"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "3850268e305f4ff0c2a747a5b9085f11a306e6b5"
|
|
44
44
|
}
|