triage/config.py
iomgaa cc59034f1d 增强任务控制器智能体模式和模型配置
- 新增TaskController简化模式和分数驱动模式支持
- 添加phi4模型配置选项
- 优化主程序参数配置和默认设置
- 完善工作流和步骤执行器功能
- 更新.gitignore忽略规则

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 23:59:41 +08:00

115 lines
3.7 KiB
Python
Executable File
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 os
API_KEY = "sk-263038d4bf4e46a0bed16532587cff40"
# {project_root}/medsynthai
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# LLM model configuration based on agno
LLM_CONFIG = {
"deepseek": {
"class": "DeepSeek",
"params": {
"id": "deepseek-chat",
"api_key": API_KEY,
"base_url": "https://api.deepseek.com"
}
},
"gpt-oss:latest": {
"class": "OpenAILike",
"params": {
"id": "gpt-oss",
"base_url": "http://100.82.33.121:19090/v1", # Ollama OpenAI兼容端点
"api_key": "gpustack_d402860477878812_9ec494a501497d25b565987754f4db8c" # Ollama不需要真实API密钥任意字符串即可
}
},
"phi4": {
"class": "OpenAILike",
"params": {
"id": "microsoft/phi-4",
"base_url": "http://127.0.0.1:8000/v1", # Ollama OpenAI兼容端点
"api_key": "gpustack_d402860477878812_9ec494a501497d25b565987754f4db8c" # Ollama不需要真实API密钥任意字符串即可
}
},
"Qwen3-7B": {
"class": "OpenAILike",
"params": {
"id": "qwen3",
"base_url": "http://100.82.33.121:19090/v1", # Ollama OpenAI兼容端点
"api_key": "gpustack_d402860477878812_9ec494a501497d25b565987754f4db8c" # Ollama不需要真实API密钥任意字符串即可
}
},
"Gemma3-4b": {
"class": "OpenAILike",
"params": {
"id": "gemma-3-4b-it",
"base_url": "http://100.82.33.121:19090/v1", # Ollama OpenAI兼容端点
"api_key": "gpustack_d402860477878812_9ec494a501497d25b565987754f4db8c" # Ollama不需要真实API密钥任意字符串即可
}
},
"deepseek-v3": {
"class": "OpenAILike",
"params": {
"id": "deepseek-v3",
"base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"api_key": API_KEY
}
},
"deepseek-r1": {
"class": "OpenAILike",
"params": {
"id": "deepseek-r1",
"base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"api_key": API_KEY
}
},
"qwen-max": {
"class": "OpenAILike",
"params": {
"id": "qwen-max",
"base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"api_key": API_KEY
}
},
"qwen-vl-max": {
"class": "OpenAILike", # 使用OpenAI兼容类
"params": {
"id": "qwen-vl-max",
"base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1", # OpenAI兼容端点 # 降低随机性,提高结果一致性
"api_key": API_KEY
}
},
"aliyun": {
"class": "OpenAILike",
"params": {
"id": "qwen-max", # 默认使用qwen-max模型
"base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"api_key": API_KEY
}
}
}
AGENT_CONFIG = {
"medical_image_analysis_agent": "qwen-vl-max"
}
RAG_CONFIG = {
"lightrag": {
"working_dir": "./Vector_DB_Med",
"tokenizer_name": "trueto/medbert-base-chinese",
"model_name": "trueto/medbert-base-chinese",
"embedding_dim": 768,
"max_token_size": 512
},
"chroma_db": {
"api_key": API_KEY,
"base_url": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"collection_name": "doctor",
"batch_size": 100,
"chroma_db_path": os.path.join(BASE_DIR, "static/rag/chroma_db"),
"csv_path": os.path.join(BASE_DIR, "static/files/zhongkang_doctor_list.csv")
}
}