@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/dist/index.d.cts CHANGED
@@ -359,6 +359,7 @@ declare class Atticus {
359
359
  private createGetUIStateTool;
360
360
  private createUIActionTool;
361
361
  private buildInstructions;
362
+ private getGenderDirective;
362
363
  private getLanguageDirective;
363
364
  private getUIDirective;
364
365
  /**
package/dist/index.d.ts CHANGED
@@ -359,6 +359,7 @@ declare class Atticus {
359
359
  private createGetUIStateTool;
360
360
  private createUIActionTool;
361
361
  private buildInstructions;
362
+ private getGenderDirective;
362
363
  private getLanguageDirective;
363
364
  private getUIDirective;
364
365
  /**
@@ -18902,6 +18902,12 @@ ${self._currentDOM}`;
18902
18902
  if (languageDirective) {
18903
18903
  instructions = `${languageDirective}
18904
18904
 
18905
+ ${instructions}`;
18906
+ }
18907
+ const genderDirective = this.getGenderDirective();
18908
+ if (genderDirective) {
18909
+ instructions = `${genderDirective}
18910
+
18905
18911
  ${instructions}`;
18906
18912
  }
18907
18913
  if (this.config.ui.enabled) {
@@ -18911,6 +18917,17 @@ ${this.getUIDirective()}`;
18911
18917
  }
18912
18918
  return instructions;
18913
18919
  }
18920
+ getGenderDirective() {
18921
+ const voice = this.config.voice;
18922
+ const femaleVoices = ["alloy", "coral", "sage", "shimmer"];
18923
+ const maleVoices = ["ash", "ballad", "echo", "verse"];
18924
+ if (femaleVoices.includes(voice)) {
18925
+ return `IMPORTANT: You are a female assistant. Speak and present yourself as female.`;
18926
+ } else if (maleVoices.includes(voice)) {
18927
+ return `IMPORTANT: You are a male assistant. Speak and present yourself as male.`;
18928
+ }
18929
+ return null;
18930
+ }
18914
18931
  getLanguageDirective() {
18915
18932
  const lang = this.config.language;
18916
18933
  const languageName = getLanguageName(lang || "en");