@emqo/claudebridge 0.1.5 → 0.1.6
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/core/intent.js +5 -2
- package/package.json +1 -1
package/dist/core/intent.js
CHANGED
|
@@ -22,9 +22,12 @@ export function regexDetect(text) {
|
|
|
22
22
|
export function claudeDetect(text, rotator) {
|
|
23
23
|
return new Promise(resolve => {
|
|
24
24
|
const timeout = setTimeout(() => resolve({ type: "none" }), 15000);
|
|
25
|
-
const ep = rotator.
|
|
25
|
+
const ep = rotator.count
|
|
26
|
+
? rotator.next()
|
|
27
|
+
: { name: "cli-default", api_key: "", base_url: "", model: "" };
|
|
26
28
|
const env = { ...process.env };
|
|
27
|
-
|
|
29
|
+
if (ep.api_key)
|
|
30
|
+
env.ANTHROPIC_API_KEY = ep.api_key;
|
|
28
31
|
if (ep.base_url)
|
|
29
32
|
env.ANTHROPIC_BASE_URL = ep.base_url;
|
|
30
33
|
const prompt = `Classify the user's intent. Output ONLY one JSON line, no other text:
|