Skip to content
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

希望可以支持few shot功能 #1176

Closed
leslie2046 opened this issue Sep 14, 2023 · 5 comments
Closed

希望可以支持few shot功能 #1176

leslie2046 opened this issue Sep 14, 2023 · 5 comments
Assignees
Labels
💪 enhancement New feature or request

Comments

@leslie2046
Copy link
Contributor

Description of the new feature / enhancement

可以控制是否记忆上下文,并且可以添加system提示,还可以添加user 和assistant的message注入到每轮对话,也就是few shots,让LLM可以始终按照固定的上下文来回答。
例如:
{
"messages": [{
"role": "system",
"content": "你是一个英语单词查询助手,每当用户发送一个英语单词给你,你都要以固定格式响应用户,\n如果用户发给你的不是一个单词,回复 'invalid token'
}, {
"role": "user",
"content": "really"
}, {
"role": "assistant",
"content": "really [/ˈriːəli/]\nadv. 真正地;确实地\nI really enjoyed the movie. (我真的很喜欢这部电影)\nadv. 非常;真正地\nShe's really talented. (她真的很有才华)\nadv. 实在;事实上\nI can't believe it's really happening. (我简直不敢相信这是真的发生了)"
}, {
"role": "user",
"content": "run"
}, {
"role": "assistant",
"content": "run [/rʌn/]\n\nv. 奔跑;运行\nI like to run in the park every morning. (我喜欢每天早上在公园里跑步)\nn. 奔跑;竞赛;连续的演出\nHe went for a run after work. (他下班后去跑步了)\nadj. 连续的;流畅的\nThis printer is really fast and runs smoothly. (这台打印机速度非常快,而且运行流畅)"
}]
}

Scenario when this would be used?

比如我们可以制作一些专用的,无需上下文的,只需要固定的上下文( system message和few shots)的工具型应用

Supporting information

参考:ChatGPTNextWeb/ChatGPT-Next-Web#138

@leslie2046 leslie2046 added the 💪 enhancement New feature or request label Sep 14, 2023
@crazywoola
Copy link
Member

We are working on this now. Please wait for this in next 2 releases. Maybe :)

@leslie2046
Copy link
Contributor Author

nice job@crazywoola

@crazywoola
Copy link
Member

We have launched the advanced prompt edit mode. You can try this in our cloud version or update to latest version. v0.3.27.

@leslie2046
Copy link
Contributor Author

谢谢,我看到了,我来测试看看

@leslie2046
Copy link
Contributor Author

leslie2046 commented Oct 13, 2023

我测试了高级提示词功能,完全满足我的需求,我发现对话型应用和生成型应用都可以使用,并且这2种应用都可以使用complete和 chat类模型。
生成型应用是不会有持续的上下文的,而对话型应用是会有持续的上下文的。因此对于固定上下文的我就可以直接用生成型应用+chat模型+高级提示词来做。
不知我的理解是否正确。
@crazywoola

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants