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

添加滑动窗口 #5

Open
weizhenzhao opened this issue Mar 29, 2023 · 1 comment
Open

添加滑动窗口 #5

weizhenzhao opened this issue Mar 29, 2023 · 1 comment

Comments

@weizhenzhao
Copy link

for i, (old_query, response) in enumerate(history):

大佬

冒昧问下,这里可不可以添加一个滑动窗口呀?
滑动最近3轮对话,这样会保证对话长度在一定的范围以内。

Thanks
weizhen

@ssbuild
Copy link
Owner

ssbuild commented Mar 29, 2023

outputs = self.generate(**input_ids, **gen_kwargs)

最终是调用 generate函数,我认为,如果自己微调改动, 其实可以自己写input_ids 生成,调用generate方法不调用chat方法即可,这样更合理。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants