@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/README.md
CHANGED
|
@@ -15,7 +15,7 @@ A framework-agnostic voice agent library for voice-controlled UI interactions, p
|
|
|
15
15
|
## Installation
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
npm install atticus
|
|
18
|
+
npm install @rajnandan1/atticus
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Quick Start
|
|
@@ -192,11 +192,11 @@ const agent = new Atticus({
|
|
|
192
192
|
| `connected` | - | Successfully connected |
|
|
193
193
|
| `disconnected` | - | Disconnected |
|
|
194
194
|
| `error` | `string` | Error occurred |
|
|
195
|
-
| `statusChange` | `AtticusStatus`
|
|
195
|
+
| `statusChange` | `AtticusStatus` | Connection status changed |
|
|
196
196
|
| `conversationStateChange` | `ConversationState` | Conversation state changed |
|
|
197
197
|
| `message` | `Message` | New message received |
|
|
198
198
|
| `historyChange` | `Message[]` | Conversation history updated |
|
|
199
|
-
| `stateChange` | `AtticusState`
|
|
199
|
+
| `stateChange` | `AtticusState` | Any state changed |
|
|
200
200
|
| `agentStart` | - | Agent started speaking |
|
|
201
201
|
| `agentEnd` | - | Agent stopped speaking |
|
|
202
202
|
| `userAudio` | - | User audio detected |
|
package/dist/index.cjs
CHANGED
|
@@ -18901,6 +18901,12 @@ ${self._currentDOM}`;
|
|
|
18901
18901
|
if (languageDirective) {
|
|
18902
18902
|
instructions = `${languageDirective}
|
|
18903
18903
|
|
|
18904
|
+
${instructions}`;
|
|
18905
|
+
}
|
|
18906
|
+
const genderDirective = this.getGenderDirective();
|
|
18907
|
+
if (genderDirective) {
|
|
18908
|
+
instructions = `${genderDirective}
|
|
18909
|
+
|
|
18904
18910
|
${instructions}`;
|
|
18905
18911
|
}
|
|
18906
18912
|
if (this.config.ui.enabled) {
|
|
@@ -18910,6 +18916,17 @@ ${this.getUIDirective()}`;
|
|
|
18910
18916
|
}
|
|
18911
18917
|
return instructions;
|
|
18912
18918
|
}
|
|
18919
|
+
getGenderDirective() {
|
|
18920
|
+
const voice = this.config.voice;
|
|
18921
|
+
const femaleVoices = ["alloy", "coral", "sage", "shimmer"];
|
|
18922
|
+
const maleVoices = ["ash", "ballad", "echo", "verse"];
|
|
18923
|
+
if (femaleVoices.includes(voice)) {
|
|
18924
|
+
return `IMPORTANT: You are a female assistant. Speak and present yourself as female.`;
|
|
18925
|
+
} else if (maleVoices.includes(voice)) {
|
|
18926
|
+
return `IMPORTANT: You are a male assistant. Speak and present yourself as male.`;
|
|
18927
|
+
}
|
|
18928
|
+
return null;
|
|
18929
|
+
}
|
|
18913
18930
|
getLanguageDirective() {
|
|
18914
18931
|
const lang = this.config.language;
|
|
18915
18932
|
const languageName = getLanguageName(lang || "en");
|