fix: rename QWEN_API_KEY to DASHSCOPE_API_KEY for accuracy

This commit is contained in:
AI Clinical Dev Team
2025-10-10 20:44:04 +08:00
parent 8afff23995
commit 8bd2b4fc54
3 changed files with 7 additions and 7 deletions

View File

@@ -9,11 +9,11 @@ export class QwenAdapter implements ILLMAdapter {
constructor(modelName: string = 'qwen-turbo') {
this.modelName = modelName;
this.apiKey = config.qwenApiKey || '';
this.apiKey = config.dashscopeApiKey || '';
this.baseURL = 'https://dashscope.aliyuncs.com/api/v1/services/aigc/text-generation/generation';
if (!this.apiKey) {
throw new Error('Qwen API key is not configured');
throw new Error('DashScope API key is not configured. Please set DASHSCOPE_API_KEY in .env file.');
}
}