refactor(asl): ASL frontend architecture refactoring with left navigation
- feat: Create ASLLayout component with 7-module left navigation - feat: Implement Title Screening Settings page with optimized PICOS layout - feat: Add placeholder pages for Workbench and Results - fix: Fix nested routing structure for React Router v6 - fix: Resolve Spin component warning in MainLayout - fix: Add QueryClientProvider to App.tsx - style: Optimize PICOS form layout (P+I left, C+O+S right) - style: Align Inclusion/Exclusion criteria side-by-side - docs: Add architecture refactoring and routing fix reports Ref: Week 2 Frontend Development Scope: ASL module MVP - Title Abstract Screening
This commit is contained in:
43
backend/src/common/llm/adapters/ClaudeAdapter.ts
Normal file
43
backend/src/common/llm/adapters/ClaudeAdapter.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { CloseAIAdapter } from './CloseAIAdapter.js';
|
||||
|
||||
/**
|
||||
* Claude-4.5-Sonnet适配器(便捷封装)
|
||||
*
|
||||
* 通过CloseAI代理访问Anthropic Claude-4.5-Sonnet模型
|
||||
*
|
||||
* 模型特点:
|
||||
* - 准确率:93%
|
||||
* - 速度:中等
|
||||
* - 成本:¥0.021/1K tokens
|
||||
* - 适用场景:第三方仲裁、结构化输出、高质量文本生成
|
||||
*
|
||||
* 使用场景:
|
||||
* - 双模型对比筛选(DeepSeek vs GPT-5)
|
||||
* - 三模型共识仲裁(DeepSeek + GPT-5 + Claude)
|
||||
* - 作为独立裁判解决冲突决策
|
||||
*
|
||||
* 使用示例:
|
||||
* ```typescript
|
||||
* import { ClaudeAdapter } from '@/common/llm/adapters';
|
||||
*
|
||||
* const claude = new ClaudeAdapter();
|
||||
* const response = await claude.chat([
|
||||
* { role: 'user', content: '作为第三方仲裁,请判断文献是否应该纳入...' }
|
||||
* ]);
|
||||
* ```
|
||||
*
|
||||
* 参考文档:docs/02-通用能力层/01-LLM大模型网关/03-CloseAI集成指南.md
|
||||
*/
|
||||
export class ClaudeAdapter extends CloseAIAdapter {
|
||||
/**
|
||||
* 构造函数
|
||||
* @param modelName - 模型名称,默认 'claude-sonnet-4-5-20250929'
|
||||
*/
|
||||
constructor(modelName: string = 'claude-sonnet-4-5-20250929') {
|
||||
super('claude', modelName);
|
||||
console.log(`[ClaudeAdapter] 初始化完成,模型: ${modelName}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user