Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…key error messages
|
@wang-boyu Sir can you check this? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #85 +/- ##
==========================================
+ Coverage 87.61% 88.33% +0.71%
==========================================
Files 19 19
Lines 1405 1423 +18
==========================================
+ Hits 1231 1257 +26
+ Misses 174 166 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks. LGTM. Merging now. |
Overview
This PR improves the logging and error handling within the
ModuleLLM
class to better align with Python library best practices.
Key Changes
Replaced rich.console with logging: Switched from using rich.console.Console for warnings to the standard Python logging module. This allows integrators to manage log levels and outputs through standard configuration.
Enhanced API Key Error Messages: Updated the ValueError raised when a provider's API key is missing. The error now explicitly states the required environment variable name (e.g., OPENAI_API_KEY) and suggests a fix (e.g., "set it in your .env file").
Cleaned up Warning Strings: Standardized the formatting of warning logs to use parameter injection instead of f-strings, consistent with logging standards.