@wabot-dev/framework 0.9.8 → 0.9.9
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.
|
@@ -39,10 +39,26 @@ const TEST_FILE_PATTERNS = /\.(test|spec|unit|integration|e2e|multiprocess)\.(ts
|
|
|
39
39
|
const DEFAULT_EXCLUDE = ['run.ts', 'cmd.ts'];
|
|
40
40
|
const MODULE_EXT = import.meta.url.endsWith('.ts') ? '.ts' : '.js';
|
|
41
41
|
const DEFAULT_CHAT_ADAPTERS = [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
{
|
|
43
|
+
path: `../../addon/chat-bot/openia/OpenaiChatAdapter${MODULE_EXT}`,
|
|
44
|
+
name: 'OpenaiChatAdapter',
|
|
45
|
+
apiKeyEnv: 'OPENAI_API_KEY',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
path: `../../addon/chat-bot/openrouter/OpenRouterChatAdapter${MODULE_EXT}`,
|
|
49
|
+
name: 'OpenRouterChatAdapter',
|
|
50
|
+
apiKeyEnv: 'OPENROUTER_API_KEY',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
path: `../../addon/chat-bot/anthropic/AnthropicChatAdapter${MODULE_EXT}`,
|
|
54
|
+
name: 'AnthropicChatAdapter',
|
|
55
|
+
apiKeyEnv: 'ANTHROPIC_API_KEY',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
path: `../../addon/chat-bot/google/GoogleChatAdapter${MODULE_EXT}`,
|
|
59
|
+
name: 'GoogleChatAdapter',
|
|
60
|
+
apiKeyEnv: 'GOOGLE_API_KEY',
|
|
61
|
+
},
|
|
46
62
|
];
|
|
47
63
|
class ProjectRunner {
|
|
48
64
|
directories;
|
|
@@ -262,7 +278,11 @@ class ProjectRunner {
|
|
|
262
278
|
}
|
|
263
279
|
}
|
|
264
280
|
async resolveDefaultChatAdapters() {
|
|
265
|
-
const results = await Promise.all(DEFAULT_CHAT_ADAPTERS.map(async (
|
|
281
|
+
const results = await Promise.all(DEFAULT_CHAT_ADAPTERS.map(async ({ path, name, apiKeyEnv }) => {
|
|
282
|
+
if (!process.env[apiKeyEnv]) {
|
|
283
|
+
logger.info(`Skipping ${name}: ${apiKeyEnv} is not set`);
|
|
284
|
+
return null;
|
|
285
|
+
}
|
|
266
286
|
try {
|
|
267
287
|
const mod = await import(path);
|
|
268
288
|
const adapter = mod[name];
|