fix: align MAX_CONVERSATION_TURNS in .env.example with code default#408
fix: align MAX_CONVERSATION_TURNS in .env.example with code default#408howardpen9 wants to merge 1 commit intoBeehiveInnovations:mainfrom
Conversation
The code default in conversation_memory.py is 50, but .env.example had 40. This mismatch causes test_add_turn_max_limit to fail when users copy .env.example to .env. Fixes BeehiveInnovations#332
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an inconsistency between the example environment configuration and the application's default settings. By synchronizing the maximum conversation turns value, it ensures that developers using the provided example configuration will not encounter unexpected test failures related to this setting, thereby improving the initial setup experience and reliability. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly aligns MAX_CONVERSATION_TURNS in .env.example with the code's default value of 50. This is an important fix to prevent test failures for users setting up the environment. I have one suggestion to improve the clarity of the comment in .env.example. Additionally, for full consistency, the documentation in docs/configuration.md should also be updated, as it currently specifies MAX_CONVERSATION_TURNS=20.
| # Each exchange (Claude asks, Gemini responds) counts as 2 turns | ||
| # So 20 turns = 10 exchanges. Defaults to 40 if not specified | ||
| MAX_CONVERSATION_TURNS=40 | ||
| # So 25 turns = ~12 exchanges. Defaults to 50 if not specified |
There was a problem hiding this comment.
The example '25 turns = ~12 exchanges' is a bit imprecise since 25 turns is exactly 12.5 exchanges. Using an approximation might be confusing for users. For better clarity, consider using an example with whole numbers that doesn't require approximation.
# So 24 turns = 12 exchanges. Defaults to 50 if not specified
Summary
.env.examplehadMAX_CONVERSATION_TURNS=40, but the code default inutils/conversation_memory.py:122is50test_add_turn_max_limitto fail when users copy.env.exampleto.env.env.exampleto50and corrected the comment ("25 turns = ~12 exchanges")Fixes #332
Test plan
.env.exampleto.env, runpytest tests/test_conversation_memory.py::TestConversationMemory::test_add_turn_max_limit -v— should passMAX_CONVERSATION_TURNS=40