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

[Feature Request]: Support for function calling and images in MessageHistoryLimiter #3121

Open
pamelafox opened this issue Jul 12, 2024 · 0 comments
Labels
0.2 Issues which are related to the pre 0.4 codebase needs-triage

Comments

@pamelafox
Copy link
Member

Is your feature request related to a problem? Please describe.

We are thinking of using AutoGen for our multi-turn chat application, but we need message limiting based on token count, to avoid going over the context window. I currently use a package that I maintain for that, at https://github.com/pamelafox/openai-messages-token-helper
My package accounts for messages from any GPT model, function calling, and image requests with vision models. I don't believe MessageHistoryLimiter handles function calls and image requests, from what i saw of the code.

Describe the solution you'd like

You could bring in the logic from my package into MessageHistoryLimiter. My logic isn't perfect, since it's based on devs reverse-engineering the OpenAI token construction, but it gets within 4 tokens in all my tests. My repo also includes unit tests and live tests.

Additional context

No response

@rysweet rysweet added 0.2 Issues which are related to the pre 0.4 codebase needs-triage labels Oct 2, 2024
@fniedtner fniedtner removed the feature label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.2 Issues which are related to the pre 0.4 codebase needs-triage
Projects
None yet
Development

No branches or pull requests

3 participants