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

Long messages cause an error #3441

Open
lincheoll opened this issue Feb 11, 2025 · 4 comments
Open

Long messages cause an error #3441

lincheoll opened this issue Feb 11, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@lincheoll
Copy link
Contributor

Describe the bug

Long messages cause an error.

To Reproduce

Using PostgreSQL as the database, sending a message longer than 255 characters causes an error.

Alternatively, if the most recent message is too long (an error occurs in factsProvider), the issue arises due to the message length. Since it uses the levenshtein function, the error message:

"levenshtein argument exceeds maximum length of 255 characters"

appears when a long message is processed. This happens immediately when sending a long message at once. Applying slicing resolves the issue, but I'm not sure if that's the right approach.

It would be great if someone could fix this.

I'm curious about the best way to handle this, though I haven't tested it on other databases.

Expected behavior

Long texts or past chat history should not cause errors.

Screenshots

Additional context

I don’t think this happened before… I’m not sure. I don’t know where to look.

@lincheoll lincheoll added the bug Something isn't working label Feb 11, 2025
@alois8
Copy link

alois8 commented Feb 12, 2025

+1
(I have this in v0.25.6-alpha.1)

@lincheoll
Copy link
Contributor Author

@alois8
After checking, such an error does not occur in v0.1.9.
However, there seem to be other issues…

@odilitime
Copy link
Collaborator

Encountering this is a v0.1.9 copy

@tercel
Copy link
Contributor

tercel commented Feb 13, 2025

modify to below can work well.
levenshtein( left($1, 255), left(content_text, 255) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants