Titles generated by summarizeText
frequently include quotation marks.
#18
CNSeniorious000
started this conversation in
General
Replies: 2 comments
-
I think this is a good change, pr welcome. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I find a bug I made in #22. For example:
This is bad. So I recommend revert this commit or change it as follow: updateConversationById(conversation.id, {
- name: generatedTitle.replace(/^['"\s]+|['"\s]+$/g, ''),
+ name: (generatedTitle.startsWith('"') && generatedTitle.endsWith('"')) ? generatedTitle.slice(1, -1) : generatedTitle
}) Sorry about making a buggy PR. |
Beta Was this translation helpful? Give feedback.
0 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
As the title suggests.
I tried to prompt engineering to force it not to produce quotes but proved ineffective. With the goal of conserving tokens in mind, I think we can use regular expressions to remove the quotes from the title as a post-processing step.
In
src/logics/conversation.ts
:It works fine! You can check it out at my free deploy https://anse.up.railway.app/ ✨
How do you think of it?
Beta Was this translation helpful? Give feedback.
All reactions