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

render throws an exception if larger than the token_limit #4

Open
cbpeters opened this issue Feb 1, 2024 · 1 comment
Open

render throws an exception if larger than the token_limit #4

cbpeters opened this issue Feb 1, 2024 · 1 comment

Comments

@cbpeters
Copy link

cbpeters commented Feb 1, 2024

Currently calling render() throws an exception if the provided messages are larger than the provided token_limit.

Shouldn't render() just return back a truncated response based on the provided priorities?

@tg1482
Copy link
Owner

tg1482 commented Feb 2, 2024

Can you please share the code that you're using to run it?

The ValueError is thrown by design so you can catch it and return an empty array for those instances. Ideally you'll have a token_limit large enough to fit atleast one message while using Scope to prioritize which ones should be included or discarded.

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