# 20260602 **Repository Path**: kuwam3603/20260602 ## Basic Information - **Project Name**: 20260602 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-06-02 - **Last Updated**: 2026-06-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 课堂练手项目 - 加薪智能体 ## 功能 - 使用 Milvus 存储学生信息(id, name, salary, hobby, 向量) - 定义加薪工具 `jiaxi`:给喜欢打麻将的学生增加 2600 元薪资 - 通过 LangChain Agent 调用工具执行加薪 ## 运行步骤 ### 1. 启动 Milvus(使用 Docker) ```bash docker-compose up -d ### 2. 创建虚拟环境并安装依赖 bash python -m venv .venv .venv\Scripts\activate # Windows pip install -r requirements.txt 3. 配置 API Key 在项目根目录创建 .env 文件,写入: text DEEPSEEK_API_KEY=你的密钥 4. 运行程序 bash python src/agent_demo.py 预期输出示例 text >>> 正在执行加薪任务... >>> Agent 回复: 已为李四和王五成功加薪2600元,当前新薪资分别为14600和16600。 码云仓库地址 [请替换为你的仓库地址] text --- ## 10. 运行结果截图(示例) 运行 `python src/agent_demo.py` 后,终端输出类似下图: Milvus 初始化完成,学生数据已插入。 正在执行加薪任务... Agent 回复: 加薪完成: 李四: 12000 -> 14600 王五: 14000 -> 16600 每人加薪 2600 元。 text 请将你的实际截图放入 `screenshots/run_result.png`。 --- ## 提交码云的命令 ```bash git init git add . git commit -m "完成加薪智能体课堂练习" git remote add origin https://gitee.com/你的用户名/teacher_langchain_20260602.git git push -u origin master