[go: nahoru, domu]

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

fix: address corner cases in filename sanitization #1070

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

Yefori-Go
Copy link
Contributor

作者自述

描述

部分模型在总结对话草拟标题时可能无法很好的遵循指令,生成的标题会导致历史文件无法正常保存。
本次 pull request 主要对文件名中特殊字符的处理进行了优化,确保文件名在保存时不会因为特殊字符而导致系统错误。

Before:
image

After:
image

相关问题

#913

补充信息

关于对话标题保存相关建议见评论区。

@Yefori-Go
Copy link
Contributor Author

直接将总结的对话标题作为文件名保存存在不妥,我看了一下保存的对话json文件,其中包含一些对话元信息,是否可以考虑将标题存于元信息中,使用标题hash或保存时间戳等作为文件名?

@GaiZhenbiao
Copy link
Owner

确实,用hash作为文件名会更好。

@Keldos-Li Keldos-Li mentioned this pull request Mar 30, 2024
Copy link
Collaborator
@Keldos-Li Keldos-Li left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

要先合并掉吗?感觉gradio4短期内没法并进主线了(

@Keldos-Li Keldos-Li merged commit 1b8e2c6 into GaiZhenbiao:main Apr 2, 2024
1 check passed
bentwnghk added a commit to bentwnghk/CHChatGPT that referenced this pull request Apr 3, 2024
fix: address corner cases in filename sanitization (GaiZhenbiao#1070)
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

Successfully merging this pull request may close these issues.

None yet

4 participants