Files
AIclinicalresearch/backend/src/common/llm/adapters/ClaudeAdapter.ts
HaHafeng 88cc049fb3 feat(asl): Complete Day 5 - Fulltext Screening Backend API Development
- Implement 5 core API endpoints (create task, get progress, get results, update decision, export Excel)
- Add FulltextScreeningController with Zod validation (652 lines)
- Implement ExcelExporter service with 4-sheet report generation (352 lines)
- Register routes under /api/v1/asl/fulltext-screening
- Create 31 REST Client test cases
- Add automated integration test script
- Fix PDF extraction fallback mechanism in LLM12FieldsService
- Update API design documentation to v3.0
- Update development plan to v1.2
- Create Day 5 development record
- Clean up temporary test files
2025-11-23 10:52:07 +08:00

52 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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}`);
}
}