| [English](README.md) | |
| # Qwen2.5-Interpreter | |
| ## 模型概述 | |
| **Qwen2.5-Interpreter** 是基于 Qwen2.5-0.5B 微调的模型,专为执行自然语言操作任务而设计。用户可以通过自然语言描述需求,该模型会将请求解析为 Python 或 Batch 脚本,并在 Windows 系统上执行相关操作。模型特别擅长自动化任务,确保操作的安全性、精确性和高效性。 | |
| --- | |
| **你可以结合[Code-Atlas项目](https://github.com/ystemsrx/Code-Atlas)使用本模型,实现便捷的集成与功能扩展。** | |
| --- | |
| ## 适用场景 | |
| 本模型专为自然语言驱动的自动化任务而设计。用户可以通过日常语言描述操作需求,模型会自动解析、规划并生成可执行脚本。在以下 **系统提示词** 配合下,模型能达到最佳表现: | |
| ``` | |
| **Identity Setup**: | |
| - You are **Open Interpreter**, operating on the user's Windows computer. | |
| **Execution Capability**: | |
| - Complete tasks using **Batch scripts** or **Python code**. | |
| **Operation Process**: | |
| 1. **Receive Request**: The user submits an operation request. | |
| 2. **Develop Plan**: Plan the steps and required resources. | |
| 3. **Choose Language**: Select Batch or Python. | |
| 4. **Generate and Output Code**: Provide executable code to the user. | |
| 5. **Receive Execution Results**: Obtain the results of the executed code sent by the user. | |
| 6. **Ensure Single Execution**: Accurately discern execution results to prevent repeated executions of the same code. | |
| **Code Requirements**: | |
| - **No User Interaction**: No user input required. | |
| - **Path Handling**: Use the current directory by default, ensure paths are valid and secure. | |
| - **Execution Result Handling**: Obtain, parse, and succinctly feedback the results. | |
| **Multi-step Tasks**: | |
| - Execute complete code snippets step-by-step, maintaining solution consistency. For the same problem, only one solution can be used. | |
| **Security and Efficiency**: | |
| - Code is safe and harmless, follows best programming practices, ensuring efficiency and maintainability. | |
| - Must avoid hallucinations. | |
| **Additional Instructions**: | |
| - **Result Submission**: After executing the code, the user will send the execution results back to you. | |
| - **Avoid Redundancy**: Ensure that each code snippet is executed only once by accurately tracking and recognizing previously executed tasks. | |
| ``` | |
| 通过上述提示词,用户可以充分利用模型的能力,以自然语言完成复杂任务。 | |
| --- | |
| ## 示例用法 | |
| ### 示例 1: 创建一个新文件夹 | |
| ``` | |
| > 创建文件夹 | |
| # 执行计划: | |
| 1. 我会在当前目录创建一个名为 "NewFolder" 的文件夹。 | |
| **选择编程语言:** | |
| - 选择使用 Batch 脚本,因为它适合简单的文件和目录操作。 | |
| **生成的代码:** | |
| ```batch | |
| @echo off | |
| set "foldername=NewFolder" | |
| mkdir "%cd%\%foldername%" | |
| \``` | |
| ``` | |
| --- | |
| ### 示例 2: 读取 `story.txt` 文件的内容 | |
| ``` | |
| > story.txt中有什么 | |
| # 执行计划: | |
| 1. 打开文件并读取文件内容。 | |
| **选择编程语言:** | |
| - 选择使用 Python,因为它有文件读取的功能。 | |
| **生成的代码:** | |
| ```python | |
| # 打开文件并读取文件内容 | |
| with open('story.txt', 'r', encoding='utf-8') as file: | |
| content = file.read() | |
| print(f'文件内容:{content}') | |
| \``` | |
| > 代码执行成功: 文件内容:This story is about me and my family. | |
| 文件内容:This story is about me and my family. | |
| 请问还有什么可以帮助您的吗? | |
| ``` | |
| --- | |
| ## 自然语言交互 | |
| 本模型能够根据自然语言描述执行以下任务: | |
| - **文件管理**: 例如“创建一个名为 Reports 的文件夹”或“删除所有 .log 文件”。 | |
| - **系统诊断**: 例如“检查可用磁盘空间”或“显示运行的进程”。 | |
| - **任务自动化**: 例如“备份我的 Documents 文件夹”或“运行清理临时文件的脚本”。 | |
| --- | |
| ## 训练数据 | |
| 该模型通过以下数据集微调: | |
| - 包含 Windows 系统特定命令的自然语言描述。 | |
| - 包括 Python 和 Batch 的脚本操作实例。 | |
| - 强调安全、高效的编码实践,确保生成脚本的可靠性。 | |
| --- | |
| ## 性能与基准测试 | |
| - **自然语言理解**: 能够高精度地将用户需求解析为可执行脚本。 | |
| - **代码生成精确度**: 保证生成的代码准确且可执行。 | |
| - **任务多样性支持**: 可适配广泛的系统操作需求。 | |
| --- | |
| ## 限制 | |
| - **平台限制**: 模型针对 Windows 优化,在其他操作系统上可能表现有限。 | |
| - **非交互式脚本**: 无法生成或运行需要用户实时输入的脚本。 | |
| - **复杂逻辑支持有限**: 对于高度复杂的任务可能需要额外验证。 | |
| --- | |
| ## 道德考量 | |
| - **安全性**: 生成的代码始终安全,无恶意指令。 | |
| - **隐私保护**: 避免在未明确要求的情况下生成可能泄露用户数据的代码。 | |
| - **透明性**: 在生成代码前明确告知计划和逻辑,保证用户知情。 | |
| --- | |
| ## 相关话题 | |
| 自然语言处理 自动化 Python Batch Windows 脚本 安全 系统操作 人机交互 |