You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
current_extra_instructions=setting.extra_instructionsifcurrent_extra_instructions:
setting.extra_instructions=current_extra_instructions+f"\n======\n\nIn addition, Your response MUST be written in the language corresponding to local code: {response_language}. This is crucial."else:
setting.extra_instructions=f"Your response MUST be written in the language corresponding to locale code: '{response_language}'. This is crucial."
response_language = get_settings().config.get('response_language', 'en-us')
if response_language.lower() != 'en-us':
get_logger().info(f'User has set the response language to: {response_language}')
-for key in get_settings():- setting = get_settings().get(key)- if str(type(setting)) == "<class 'dynaconf.utils.boxing.DynaBox'>":- if hasattr(setting, 'extra_instructions'):- current_extra_instructions = setting.extra_instructions- if current_extra_instructions:- setting.extra_instructions = current_extra_instructions+ f"\n======\n\nIn addition, Your response MUST be written in the language corresponding to local code: {response_language}. This is crucial."- else:- setting.extra_instructions = f"Your response MUST be written in the language corresponding to locale code: '{response_language}'. This is crucial."+ for key in get_settings():+ setting = get_settings().get(key)+ if str(type(setting)) == "<class 'dynaconf.utils.boxing.DynaBox'>":+ if hasattr(setting, 'extra_instructions'):+ current_extra_instructions = setting.extra_instructions+ if current_extra_instructions:+ setting.extra_instructions = current_extra_instructions+ f"\n======\n\nIn addition, Your response MUST be written in the language corresponding to locale code: {response_language}. This is crucial."+ else:+ setting.extra_instructions = f"Your response MUST be written in the language corresponding to locale code: '{response_language}'. This is crucial."
Suggestion importance[1-10]: 8
__
Why: The suggestion correctly identifies that updating extra_instructions should only occur when the response language is not the default 'en-us', thus improving logical flow. Moving the loop inside the conditional prevents unnecessary modifications when the default language is used.
response_language = get_settings().config.get('response_language', 'en-us')
-if response_language.lower() != 'en-us':+if not re.match(r'^[a-z]{2}-[A-Z]{2}$', response_language):+ get_logger().warning(f'Invalid locale code format: {response_language}. Defaulting to en-US')+ response_language = 'en-US'+elif response_language.lower() != 'en-us':
get_logger().info(f'User has set the response language to: {response_language}')
Apply this suggestion
Suggestion importance[1-10]: 8
__
Why: The suggestion adds crucial input validation for locale codes, preventing potential runtime errors and improving system robustness by ensuring the language code follows the correct format before processing.
-> **Important:** Note that only dynamic text generated by the AI model is translated to the configured language. Static text such as labels and table headers that are not part of the AI modeles response will remain in US English.+> **Important:** Note that only dynamic text generated by the AI model is translated to the configured language. Static text such as labels and table headers that are not part of the AI model's response will remain in US English.
Suggestion importance[1-10]: 3
__
Why: The suggestion correctly identifies and fixes a minor typo ('modeles' to 'model's'), which improves documentation quality but has minimal functional impact.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
Description
言語設定処理ロジックを改善
エージェントの応答言語ログ追加
不要な温度ログ出力をコメント化
ドキュメントに新設定情報追加
Changes walkthrough 📝
pr_agent.py
応答言語設定処理の改善
pr_agent/agent/pr_agent.py
litellm_ai_handler.py
温度ログ出力の無効化
pr_agent/algo/ai_handlers/litellm_ai_handler.py
README.md
READMEの更新と新情報追加
README.md
additional_configurations.md
言語設定ドキュメントの更新
docs/docs/usage-guide/additional_configurations.md
configuration.toml
構成ファイルのモデル設定更新
pr_agent/settings/configuration.toml