@unctad-ai/voice-agent-server 0.1.7 → 1.0.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"systemPrompt.d.ts","sourceRoot":"","sources":["../src/systemPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACxE,UAAU,CAAC,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxD,SAAS,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC5F,UAAU,CAAC,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,IAAI,CAAC;CAC9D;
|
|
1
|
+
{"version":3,"file":"systemPrompt.d.ts","sourceRoot":"","sources":["../src/systemPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACxE,UAAU,CAAC,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxD,SAAS,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC5F,UAAU,CAAC,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,GAAG,IAAI,CAAC;CAC9D;AAuBD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,MAAM,CA6BvF"}
|
package/dist/systemPrompt.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
const BASE_RULES = `RULES:
|
|
2
2
|
1. Two sentences max, under 40 words. Plain spoken English — no markdown, lists, formatting, or bracketed tags like [Awaiting response]. Never use contractions (say "you would" not "you'd", "I am" not "I'm", "do not" not "don't").
|
|
3
3
|
2. Summarize, never enumerate. Say "three categories like investor services and permits" — never list every item.
|
|
4
|
-
3. After
|
|
4
|
+
3. After tool calls, do not narrate the tools — focus on the result. Say "Kenya has three investor services" not "I searched and found three services."
|
|
5
5
|
4. Never fabricate information. Never say you lack a capability your tools provide.
|
|
6
6
|
5. Say exactly [SILENT] if the speaker is not addressing you — side conversations, background noise, or filler words. When unsure, choose [SILENT].
|
|
7
7
|
|
|
8
|
+
TONE: Sound like a warm, knowledgeable human — not a machine reading a script. A brief acknowledgment like "Sure!" before the answer is enough. Be conversational and vary your phrasing.
|
|
9
|
+
|
|
8
10
|
PROACTIVE NAVIGATION: When the user asks about a service, call searchServices first. Then call BOTH viewService (to show the page) AND getServiceDetails (to get data you can speak about) — do not call one without the other. When the user wants to APPLY, call startApplication instead of viewService.
|
|
9
11
|
|
|
10
12
|
TOOL SELECTION: Use searchServices when the user has a specific keyword or service in mind. Use listServicesByCategory when the user wants to BROWSE or see ALL services in a category.
|
package/dist/systemPrompt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"systemPrompt.js","sourceRoot":"","sources":["../src/systemPrompt.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,GAAG
|
|
1
|
+
{"version":3,"file":"systemPrompt.js","sourceRoot":"","sources":["../src/systemPrompt.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;mKAmBgJ,CAAC;AAEpK,MAAM,UAAU,iBAAiB,CAAC,MAAkB,EAAE,WAAyB;IAC7E,+BAA+B;IAC/B,IAAI,MAAM,GAAG,WAAW,MAAM,CAAC,WAAW,oCAAoC,MAAM,CAAC,SAAS,KAAK,MAAM,CAAC,iBAAiB,iBAAiB,MAAM,CAAC,WAAW,OAAO,CAAC;IAEtK,mCAAmC;IACnC,MAAM,IAAI,UAAU,CAAC;IAErB,kDAAkD;IAClD,IAAI,CAAC,WAAW;QAAE,OAAO,MAAM,CAAC;IAEhC,IAAI,WAAW,CAAC,KAAK,EAAE,CAAC;QACtB,MAAM,IAAI,qBAAqB,WAAW,CAAC,KAAK,EAAE,CAAC;IACrD,CAAC;IACD,IAAI,WAAW,CAAC,cAAc,EAAE,CAAC;QAC/B,MAAM,CAAC,GAAG,WAAW,CAAC,cAAc,CAAC;QACrC,MAAM,IAAI,sBAAsB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,QAAQ,0CAA0C,CAAC;IACnG,CAAC;IACD,IAAI,WAAW,CAAC,UAAU,EAAE,CAAC;QAC3B,MAAM,IAAI,yBAAyB,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,CAAC;IAC9E,CAAC;IACD,IAAI,WAAW,CAAC,SAAS,IAAI,WAAW,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9D,MAAM,IAAI,2CAA2C,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC;IAC/F,CAAC;IACD,IAAI,WAAW,CAAC,UAAU,EAAE,CAAC;QAC3B,MAAM,CAAC,GAAG,WAAW,CAAC,UAAU,CAAC;QACjC,MAAM,IAAI,aAAa,CAAC,CAAC,UAAU,cAAc,CAAC,CAAC,MAAM,CAAC,MAAM,sDAAsD,CAAC;IACzH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unctad-ai/voice-agent-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"directory": "packages/server"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@unctad-ai/voice-agent-core": "0.
|
|
20
|
+
"@unctad-ai/voice-agent-core": "1.0.0"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@ai-sdk/groq": "^3.0.0",
|