Skip to content

Hugging#34

Merged
howethomas merged 27 commits intomainfrom
hugging
Apr 29, 2025
Merged

Hugging#34
howethomas merged 27 commits intomainfrom
hugging

Conversation

@howethomas
Copy link
Contributor

Catching up on external deployments.

howethomas and others added 27 commits January 12, 2025 17:26
- Updated Poetry dependencies, including `transformers` to version 4.48.0 and added `trio` version 0.28.0.
- Removed the `hugging-llm-link` module, including its implementation, tests, and associated files, as it is no longer needed.
- Updated `pyproject.toml` and `poetry.lock` to reflect these changes.

This commit streamlines the project by eliminating unused components and ensuring all dependencies are up to date.
- Removed unnecessary print statement for inbound_vcon type.
- Simplified logging message formatting for clarity.
- Updated error handling to return a JSON response with an error message on failure.
- Ensured successful responses return a JSON representation of the vcon with a 201 status code.

This commit improves code readability and enhances error handling in the API endpoint.
- Changed MongoDB connection URL format in example_config.yml to include authentication.
- Refactored `prepare_vcon_for_mongo` function to improve logging and added type hints.
- Enhanced `save`, `fetch`, and `exists` functions with detailed logging and error handling.
- Added docstrings to new functions for better documentation and clarity.

These changes improve the MongoDB integration and ensure better maintainability of the code.
- Simplified file content decoding in `get_file_content()`
- Removed temporary file handling in transcription process
- Updated logging and error handling in transcription workflow
- Removed unnecessary dialog filtering conditions
- Simplified API request headers and content handling

The changes streamline the Whisper transcription link implementation and improve its robustness.
- Add type checking before parsing JSON strings
- Prevent potential parsing errors by checking string type
- Ensure robust handling of JSON-encoded attachments and analysis
…egration

- Modify Python version constraint to 3.12 (excluding 3.13)
- Add PyTorch installation in Dockerfile for local LLM tests
- Update Hugging Face Whisper tests to use environment variable for API key
- Add conditional test skipping for Hugging Face Whisper tests
- Refactor configuration import and usage in tests
- Introduced Datadog agent service with necessary environment variables and volume mounts.
- Added service labels for Python and Redis services to enable Datadog monitoring.
- Ensured proper network configuration for all services.
- Convert vcon_data to a JSON string for processing.
- Check for and replace occurrences of system_prompt in the JSON string.
- Log the replacement action for better traceability.
- Introduced a new diet module to modify vCon data by removing dialog bodies, analysis, and specific attachment types.
- Implemented functionality to post media content to a specified URL and replace dialog bodies with the returned URLs.
- Added a recursive function to remove system_prompt keys from nested structures for enhanced security.
- Included comprehensive unit tests to validate the behavior of the diet module and its options.
…or handling

- Adjusted the exponential backoff strategy to start waiting at 12 seconds and cap at 100 seconds between retries, enhancing the robustness of the retry mechanism.
- Introduced a new WAV file: en_NatGen_CallCenter_BethTom_CancelPhonePlan.wav to the hugging_face_whisper directory for use in the application.
- Introduced a new tag router module that routes vCons to different Redis lists based on tags found in attachments.
- Implemented a run function that processes vCons, extracts tags, and logs routing actions.
- Added comprehensive unit tests to validate the tag routing behavior with various scenarios, including handling of missing tags and different tag formats.
- Updated logging levels in the diet module to provide more informative output during execution.
- Changed the key from "dialogs" to "dialog" in the sample vCon structure for consistency with the processing logic.
- Enhanced unit tests to reflect the updated vCon structure and ensure proper functionality of the diet module.
- Verified that all relevant options are logged during the run process for better traceability.
- Introduced a new module for integrating Groq's Whisper ASR service to transcribe audio content in vCon recordings.
- Added configuration options for minimum audio duration and API key management.
- Implemented error handling and logging for transcription processes.
- Updated dependencies in pyproject.toml and poetry.lock to include the Groq library.
- Created tests to ensure functionality and error handling in the transcription process.
@howethomas howethomas merged commit ec59a93 into main Apr 29, 2025
2 checks passed
@howethomas howethomas deleted the hugging branch April 30, 2025 13:29
howethomas added a commit that referenced this pull request Jan 16, 2026
Hugging face has finally been merged. Woooo.
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.

1 participant