使用手册:User Guide:CodeGeeX是什么?What's CodeGeeX?CodeGeeX是智谱AI旗下的一款基于大模型的智能编程助手,它可以实现代码的生成与补全,自动为代码添加注释,不同编程语言的代码间实现互译,针对技术和代码问题的智能问答,当然还包括代码解释,生成单元测试,实现代码审查,修复代码bug等非常丰富的功能。 CodeGeeX is an AI-based coding assistant. It is powered by a large-scale multilingual code generation model, lots of features including generates and completes code, automatically adds comments, translates code between different programming languages, provides intelligent answers to technical and code-related questions, code explanation, unit test generation, code review, bug fixing and so on. 你可以用CodeGeeX来做什么?What can you do with CodeGeeX?自动生成代码 Automated Code Generation在编码过程中,CodeGeeX可以根据上下文代码的内容,推理出接下来可能的代码输入。如果认为推理出的代码内容合适,使用快捷键Tab对生成的代码进行采纳,被采纳的代码即会高亮显示并留存在光标后;如果认为内容不合适,任意键可以取消推荐的内容,继续手动编码。 CodeGeeX provides autocomplete-style suggestions when you coding. You can receive suggestions with the “Tab” key, either by starting to write the code you want to use. 根据注释生成代码 Convert comments to codeCodeGeeX可以针对一段自然语言的注释内容,生成相关的代码片段 。特别是对于能够使用一句话描述清楚的、常见的算法片段、函数段、方法段等。 CodeGeeX can gengrate code by writing a natural language comment describing what you want the code to do. Especially for common algorithmic segments, function blocks, or method sections that can be described in a single sentence. 自动为代码添加注释 Automatically adding comments to codeCodeGeeX可以轻松为代码添加中(英)文注释。 在编辑器中选中代码,点击鼠标右键。在右键菜单中点击“CodeGeeX” ,然后点击下一级菜单“生成注释”即可。 CodeGeeX can automatically adds comments to code in both Chinese and English. Select the code in the editor, right-click your mouse. From the right-click menu, select "CodeGeeX", then click on the submenu "Add Comment" to generate the comment. 生成单元测试 Create unit testsCodeGeeX可以针对一段函数( 方法), 生成其对应的单元测试代码。 在编辑器中选中代码,点击鼠标右键。在右键菜单中点击“CodeGeeX” ,然后点击下一级菜单“生成单测”即可。也可以通过侧边栏的对话框,输入“/test”,生成其对应的单元测试代码。 |

No comments:
Post a Comment