# agent_m **Repository Path**: cdh171688/agent_m ## Basic Information - **Project Name**: agent_m - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-06 - **Last Updated**: 2026-05-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Medical Triage Agent(全本地离线版) ## 1. 创建 Conda 环境 ```bash conda create -n med-agent python=3.10 -y conda activate med-agent pip install -r requirements.txt ``` ## 2. 下载本地模型(ModelScope) ```bash modelscope download --model Qwen/Qwen2.5-7B-Instruct \ --local_dir /root/autodl-tmp/models/Qwen2.5-7B-Instruct modelscope download --model sentence-transformers/all-MiniLM-L6-v2 \ --local_dir /root/autodl-tmp/models/all-MiniLM-L6-v2 ``` ## 3. 启动本地 vLLM(OpenAI 兼容) ```bash python -m vllm.entrypoints.openai.api_server \ --model /root/autodl-tmp/models/Qwen2.5-7B-Instruct \ --served-model-name Qwen2.5-7B-Instruct \ --host 0.0.0.0 \ --port 8000 ``` ## 4. 启动 FastAPI(离线模式) ```bash cp .env.example .env bash run_api.sh ``` ## 5. 测试请求 ```bash curl -X POST "http://127.0.0.1:9000/chat" \ -H "Content-Type: application/json" \ -d '{ "message": "I have had fever for two days, 39C, and cough.", "user_profile": { "age": 32, "gender": "male", "height_cm": 175, "weight_kg": 70, "medication_history": ["aspirin", "warfarin"] } }' ``` ## 6. 网页访问 浏览器打开: ```text http://127.0.0.1:9000/ ``` 页面会直接调用 `/chat` 接口,支持多轮会话(`session_id` 保持)。