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

feat: Token limit setting #1030

Merged
merged 3 commits into from
Oct 4, 2024
Merged

feat: Token limit setting #1030

merged 3 commits into from
Oct 4, 2024

Conversation

kgilpin
Copy link
Contributor

@kgilpin kgilpin commented Oct 3, 2024

  1. Configuration Storage: Introduced appMap.navie.contextTokenLimit to package.json and extensionSettings.ts. This new configuration item sets a default size for the context tokens sent to Navie AI, ensuring that the relevant token size constraints are respected.
  2. Chat Completion Handling:
    • Updated chatCompletion.ts to use the navieContextTokenLimit configuration to dynamically determine the token limit.
    • Adjusted the environment variable APPMAP_NAVIE_TOKEN_LIMIT based on both the LLM default and the user-defined setting.
  3. Testing: Added unit tests for chatCompletion.ts to validate the behavior of the navieContextTokenLimit configuration, ensuring the limit is applied correctly based on different configurations.

The default for the user-assigned token limit is 8,000.

Fixes #1029

@kgilpin kgilpin added the enhancement New feature or request label Oct 3, 2024
@kgilpin kgilpin merged commit 2c0fb95 into develop Oct 4, 2024
4 checks passed
@kgilpin kgilpin deleted the feat/token-limit-setting branch October 4, 2024 13:54
@appland-release
Copy link
Contributor

🎉 This PR is included in version 0.130.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In Copilot mode, AppMap services are launched with a token limit of more than 19,000 tokens
3 participants