-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
增加打印日志 action 及 gpt prompt 的处理问题 #136
Comments
我理解你要的是 Code complete 中的 Fill in Middle 的功能? suffix 的代码其实也包含在其中,只是一直没有作为 prompt 来处理: auto-dev/src/main/kotlin/cc/unitmesh/devti/actions/chat/base/ChatBaseAction.kt Lines 46 to 48 in 90550ed
可能得看其他人有没有兴趣实现类似的功能? @jialiu-github 有兴趣吗? |
是,或许支持一下自定义 prompt?哈哈 |
自定义 prompt 中是包含 suffix 的,也就是 afterCursor https://ide.unitmesh.cc/customize/variables 可以使用自定义 team prompt :https://ide.unitmesh.cc/custom/team-prompts 理论上自定义个人 prompt 也行: |
哦哦,这个我大致了解了一下,team prompt 好像不会感知到待插入的位置?就是当前光标位置 |
cursor 就是光标位置 |
…mActionBaseIntention.kt` to improve efficiency and readability #136
…ionBaseIntention.kt` to improve efficiency and readability. Introduce a new `ClassStructureVariableResolver` class to handle class context-based variable resolution. #136
可以的,能用 |
1. 增加打印日志 action
需求就是如题了,打印日志我个人使用的 prompt 是:
你是一个专业的程序员,请在 ${generatedContent} 处打印日志,不需要解释,只需要返回 ${generatedContent} 处生成的内容
2. gpt prompt 处理问题,只包含了 prefix
这是想探讨的另一个问题,比如上面我生成日志用的 prompt 实际给出了完整的文件内容和待插入的位置
然后我注意到 auto-dev 的 prompt 其实只包含了光标之前的内容,即 prefix
auto-dev 应该是参考了 copilot 并且考虑了 token 的成本问题,不过也会引入一些问题
如 b 站演示视频在代码生成的时候就出现一些重复的花括号 } }
suffix 包含的下文或许也包含了些有用的信息
个人认为 auto-dev 是主动触发的 action,不同于 copilot 的换行就会触发,token 用量上是不是可以也稍微放开点。
The text was updated successfully, but these errors were encountered: