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

Enforce 2000 character message size limit #822

Closed
andreaskoepf opened this issue Jan 18, 2023 · 5 comments
Closed

Enforce 2000 character message size limit #822

andreaskoepf opened this issue Jan 18, 2023 · 5 comments
Assignees
Labels
backend good first issue Good issue for project newcomers

Comments

@andreaskoepf
Copy link
Collaborator

andreaskoepf commented Jan 18, 2023

The backend should reject incoming text-messages (initial prompt, assistant-reply, prompter-reply) that exceed a maximum message size limit with an OasstError (define new code). The limit should be defined in the backend settings with a default value of 2000 characters.

@andreaskoepf andreaskoepf added this to the Minimum Viable Prototype milestone Jan 18, 2023
@andreaskoepf andreaskoepf added the good first issue Good issue for project newcomers label Jan 18, 2023
@oriyonay
Copy link
Contributor

i can take this as a first issue :)

@AbdBarho
Copy link
Collaborator

Is there anyway the website knows the value? maybe we can also enforce there, we can definitely hardcode 2000 at the beginning.

@andreaskoepf
Copy link
Collaborator Author

Is there anyway the website knows the value? maybe we can also enforce there, we can definitely hardcode 2000 at the beginning.

Not yet, but I can add a configuration endpoint for trusted_api clients.

@andreaskoepf
Copy link
Collaborator Author

@oriyonay we will add the message size limit setting also to the PublicSettings model used for /api/v1/backend_settings/public .. see #830

@oriyonay
Copy link
Contributor

@andreaskoepf thank you! will take a look in a few hours (after classes :))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend good first issue Good issue for project newcomers
Projects
Archived in project
Development

No branches or pull requests

3 participants