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

Auto-trim content if too large for context window #87

Open
xpluscal opened this issue Feb 11, 2025 · 1 comment
Open

Auto-trim content if too large for context window #87

xpluscal opened this issue Feb 11, 2025 · 1 comment

Comments

@xpluscal
Copy link

As far as I can see there is currently no native way here to ensure we don't hit the max context window?
Would be awesome to have base agents use tiktoken or similar to handle this - or am I missing something?

@KennyVaneetvelde
Copy link
Member

Nope you are correct this is one area I have slightly neglected. I am open to suggestions on implementation here, tiktoken can be used for openAI, but we'll need to have an elegant way to support it for every possible provider or have a nice way that we can chip away at it in an extensible way

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