Comments (3)
-
解析
.project_doc_record/.project_hierarchy.json
获取到函数单元,根据此单元生成单元测试,此处可以在json
中增加一个属性标识函数是否生成了测试。 -
待实现 Demo 后,可以与
copilot
进行对比测试,如对比面对复杂场景下的测试率等。 -
Demo 期望时间为
2024/1/30
-
优先级从优先到普通排序:1. 对无单元测试项目进行增加单元测试 2. 对有部分单元测试项目进行补充 3. 新功能开发 4. 完成适配大模型,长窗口等要点(若此项造成较大阻碍,可指派我进行协同)
from repoagent.
参照项目:
- 自动优化某段代码:https://github.com/Codium-ai/pr-agent?tab=readme-ov-file#improve
- 让语言模型在您的计算机上运行代码 https://github.com/KillianLucas/open-interpreter
from repoagent.
参考:
AlphaCodium代码生成工作流程
-
预处理环节:
- 输入问题和测试情景
- LLM接口语句分析+prompt
- LLM进行问题分析和测试样例分析
- prompting
- 生成更多测试样例
- prompting
- 生成初步解决方案
- code generation
- 对解决方案进行打分和排序
- code evaluation
- 评价维度:prompting
- simplicity
- robustness
- correctness
- 评价维度:prompting
- code evaluation
- 输入问题和测试情景
-
答案生成环节:
- 生成初步代码答案
- code generation
- 通过样例自迭代改进代码
- evaluation
- feedback
- 通过AI测试样例进一步迭代
- evaluation
- feedback
- 输出最终的代码答案
- output
- 生成初步代码答案
期望项目结构:
1. 工作流:
代码生成
-
理解并分析修改要求:用户发起时使用chatbot交互收集修改要求,使得目标效果、使用方法、长度/复杂度限制等全部获知或默认
-
生成测试用例:针对限制生成测试用例和检查
-
生成初始解决方案:基于已有函数/解决方案采用伪代码输出简单解决方案
-
评估解决方案并排序:对解决方案的可靠性、全面性、效率和要求满足度评估并排序
5. 单元测试
-
限定待测部分并执行分解:对于划定的代码部分或整个程序进行以函数为单元的最小功能分拆(LLM prompting)
-
分析期望并生成测试用例:提供期望并描述/分析该函数在正常情况下应有的行为,包括输入、输出和任何边界条件。并使用语言模型生成一系列测试用例。这些测试用例将包括不同的输入参数,考虑异常和边界情况,用于验证函数在各种情况下的行为是否符合预期。(LLM prompting)
-
执行测试并返回修改建议:根据生成的测试用例编写实际的测试代码。这通常涉及使用测试框架(如JUnit、PyTest等)来实施和运行测试。(Loop)
-
执行测试并返回修改建议:根据生成的测试用例编写实际的测试代码。这通常涉及使用测试框架(如JUnit、PyTest等)来实施和运行测试。
2.要点
- 期望可适配各大模型基座,prompt不会过于敏感
- 期望窗口足够长
from repoagent.
Related Issues (19)
- change_detector.get_unstaged_mds() behaves out of expectation. HOT 1
- `generate_overall_structure` processed an overly broad range of files. HOT 1
- KeyError: `default_completion_kwargs` raisd in ai_doc\chat_engine.py HOT 5
- AttributeError in runner.py When Handling Exceeded Context Length HOT 1
- Handling `UnicodeDecodeError` During File Read Operation HOT 1
- pre-commit运行异常的解决方案设计 HOT 2
- chat with repo workflow issue HOT 18
- PermissionError raised in `ai_doc/file_handler.py write_file` function HOT 1
- Solution about Document tutorial & README generation HOT 6
- Solution about Document Generation
- 是否实现自举呢? HOT 1
- 生成文档的时候出现了递归溢出 HOT 4
- Questions: tree sitter, git, ollama HOT 10
- How to use AzureOpenAI instead of OpenAI HOT 1
- 请问什么时候可以支持Java项目的文档生成? HOT 1
- 使用pip安装完之后 运行repoagent configure 报错 HOT 1
- win 11 repoagent configure 失败 HOT 2
- Facing problem with project_hierarchy.json file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from repoagent.