Skip to content

Conversation

@Shuyib
Copy link
Owner

@Shuyib Shuyib commented Jul 19, 2025

This pull request introduces several improvements and fixes across two files: utils/function_call.py and voice_stt_mode.py. The changes include suppressing warnings, improving error handling, enhancing functionality for text-to-speech and news search, and refining code readability and maintainability.

Key Changes:

Improvements to Error Handling:

  • Replaced broad exception handling with more specific logging for exceptions, using exc instead of e for clarity and consistency (voice_stt_mode.py: [1] [2] [3] [4].
  • Improved error messages for tools and user interactions, ensuring better debugging information is logged (voice_stt_mode.py: voice_stt_mode.pyL356-R377).

Functional Enhancements:

  • Enhanced the search_news function to format results for readability and handle cases where no results are found (utils/function_call.py: utils/function_call.pyL863-R920).
  • Updated the translate_text function to extract and return the summary of the translation instead of the raw result (utils/function_call.py: utils/function_call.pyL941-R998).

Code Quality and Readability:

  • Added docstrings to several functions for better documentation and clarity (voice_stt_mode.py: [1] [2].
  • Refactored multiline strings and logging statements for consistency and readability (voice_stt_mode.py: [1] [2].

Suppression of Warnings:

  • Suppressed Pydantic user warnings related to namespace conflicts, ensuring cleaner logs during runtime (utils/function_call.py: [1] voice_stt_mode.py: [2].

Dependency and Import Adjustments:

Shuyib added 3 commits July 19, 2025 14:08
update imports to align more to the linter
replace pyautogen with ag2
@Shuyib Shuyib merged commit 5f4a240 into main Jul 19, 2025
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants