@rajnandan1/atticus 1.0.0 → 1.1.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.
- package/README.md +3 -3
- package/dist/index.cjs +17 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.global.js +17 -0
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18899,6 +18899,12 @@ ${self._currentDOM}`;
|
|
|
18899
18899
|
if (languageDirective) {
|
|
18900
18900
|
instructions = `${languageDirective}
|
|
18901
18901
|
|
|
18902
|
+
${instructions}`;
|
|
18903
|
+
}
|
|
18904
|
+
const genderDirective = this.getGenderDirective();
|
|
18905
|
+
if (genderDirective) {
|
|
18906
|
+
instructions = `${genderDirective}
|
|
18907
|
+
|
|
18902
18908
|
${instructions}`;
|
|
18903
18909
|
}
|
|
18904
18910
|
if (this.config.ui.enabled) {
|
|
@@ -18908,6 +18914,17 @@ ${this.getUIDirective()}`;
|
|
|
18908
18914
|
}
|
|
18909
18915
|
return instructions;
|
|
18910
18916
|
}
|
|
18917
|
+
getGenderDirective() {
|
|
18918
|
+
const voice = this.config.voice;
|
|
18919
|
+
const femaleVoices = ["alloy", "coral", "sage", "shimmer"];
|
|
18920
|
+
const maleVoices = ["ash", "ballad", "echo", "verse"];
|
|
18921
|
+
if (femaleVoices.includes(voice)) {
|
|
18922
|
+
return `IMPORTANT: You are a female assistant. Speak and present yourself as female.`;
|
|
18923
|
+
} else if (maleVoices.includes(voice)) {
|
|
18924
|
+
return `IMPORTANT: You are a male assistant. Speak and present yourself as male.`;
|
|
18925
|
+
}
|
|
18926
|
+
return null;
|
|
18927
|
+
}
|
|
18911
18928
|
getLanguageDirective() {
|
|
18912
18929
|
const lang = this.config.language;
|
|
18913
18930
|
const languageName = getLanguageName(lang || "en");
|