ZHZ.YHY/code_explanation_fixer.egg-info/PKG-INFO
2026-01-08 21:48:24 +08:00

100 lines
2.6 KiB
Plaintext
Raw Permalink 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.

Metadata-Version: 2.4
Name: code-explanation-fixer
Version: 0.1.0
Summary: 代码解释与修复助手
Requires-Python: <4.0,>=3.8
Description-Content-Type: text/markdown
Requires-Dist: openai>=1.0.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: fastapi>=0.100.0
Requires-Dist: uvicorn>=0.23.0
Requires-Dist: rich>=13.0.0
Requires-Dist: customtkinter>=5.2.0
Requires-Dist: streamlit>=1.20.0
Requires-Dist: httpx>=0.28.0
# 代码解释与修复助手 - AI编程学习工具
一个智能代码解释与修复工具,帮助编程学习者理解代码并提供修复建议。
## 功能特点
- **代码解释**: 对代码进行逐行或分段的详细解释
- **Bug修复**: 识别代码问题并提供修复建议
- **多语言支持**: 支持 Python、JavaScript、Java、C++、Go、Rust 等多种编程语言
- **图形界面**: 简洁美观的界面参考豆包AI问答方式
## 快速开始
### 安装依赖
```bash
# 安装核心依赖
pip install -r requirements.txt
# 安装图形界面依赖
pip install -r requirements_gui.txt
```
### 运行应用
#### 图形界面版本(推荐)
```bash
python gui_app.py
```
#### Web API 版本
```bash
python app.py
```
访问 http://localhost:8000 查看 API 文档
## 图形界面使用说明
1. 启动 `gui_app.py` 后,会弹出一个窗口
2. 在代码输入框中粘贴或输入您的代码
3. 选择任务类型:
- 📖 代码解释:获取代码的详细解释
- 🔧 代码修复:分析并修复代码问题
4. 选择编程语言(可选择 auto 自动检测)
5. 按 **Enter** 或 **Ctrl+Enter** 发送请求
6. 等待 AI 分析,结果会显示在下方
## 配置说明
在项目根目录创建 `.env` 文件:
```
# 硅基流动 API Key必需
SILICONFLOW_API_KEY=your_api_key_here
# 可选配置
SILICONFLOW_MODEL=deepseek-ai/DeepSeek-V2.5
```
获取 API Key访问 https://cloud.siliconflow.cn 注册账号
## 项目结构
```
code-explainer-fixer/
├── gui_app.py # 图形界面版本(推荐使用)
├── app.py # Web API 版本
├── config.py # 配置文件
├── requirements.txt # 核心依赖
├── requirements_gui.txt # GUI 依赖
├── .env # API 配置(需手动创建)
├── agents/ # 智能体模块
├── services/ # 服务层
├── models/ # 数据模型
└── utils/ # 工具函数
```
## 技术栈
- **图形界面**: CustomTkinter现代化Tkinter
- **AI 服务**: 硅基流动OpenAI 兼容 API
- **Web 框架**: FastAPI + Uvicorn