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

Limit the maximum number of tokens in an entire conversation #565

Open
ArturDev42 opened this issue Jan 20, 2025 · 0 comments
Open

Limit the maximum number of tokens in an entire conversation #565

ArturDev42 opened this issue Jan 20, 2025 · 0 comments

Comments

@ArturDev42
Copy link

Thanks a lot for this cool framework! From the docs, I understand that it is possible to set the maximum number of tokens that can be generated in a single response when making API calls to models. I need to limit the tokens used across an entire interaction between user proxy and assisant, i.e. multiple messages and responses. I am using user_proxy.initiate_chat(assistant, message=message, max_turns=max_turns). Once the pre-defined token limit has been reached, the conversation should be terminated. Is this possible? Thanks!

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

1 participant