ProblemsResponse 是一个自动化工具,用于定期检查Gitea上的问题(Issues),使用阿里云DashScope大模型分析问题内容,并自动回复和关闭问题。支持文件操作功能,包括读取、搜索和替换文件内容。
- 定期检查Gitea上的开放问题(默认每10秒检查一次)
- 使用阿里云DashScope API进行问题分析
- 自动回复问题并关闭
- 支持文件操作:
- 读取文件内容(read_file)
- 搜索文件(search_files)
- 支持多轮对话处理复杂问题
- .NET 8.0 SDK
- 阿里云DashScope API密钥
- Gitea访问令牌
- 克隆项目仓库:
git clone https://git
- 进入项目目录:
cd ProblemsResponse - 恢复NuGet包:
dotnet restore
- 编译项目:
dotnet build
- 修改Program.cs中的配置参数:
const string apiUrl = "http://git.xxx.com/api/v1/"; const string owner = "USERS"; const string repo = "Problems"; const string token = "your_gitea_token"; const string aiUrl = "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions"; const string aiKey = "your_dashscope_api_key"; const string aiModel = "qwen3-235b-a22b";
- 运行项目:
dotnet run
- DiffMatchPatch 3.0.0
- DiffPlex 1.8.0
- Newtonsoft.Json 13.0.3
- 确保Gitea API和DashScope API可访问
- 文件操作默认基于路径:E:\Codes\FocusNew
- 替换文件操作需要精确匹配内容
- 请妥善保管API密钥和访问令牌
- 项目默认运行在Windows环境,如需在其他平台运行可能需要调整路径处理
<read_file>
<path>src/main.js</path>
</read_file><search_files>
<path>src</path>
<regex>.*\.js$</regex>
<file_pattern>*.js</file_pattern>
</search_files>