Skip to content

Conversation

@hassiebp
Copy link
Contributor

@hassiebp hassiebp commented May 28, 2025

Important

Add LANGFUSE_MEDIA_UPLOAD_ENABLED to control media handling in Langfuse SDK, affecting initialization and processing in resource_manager.py and media_manager.py.

  • Environment Variables:
    • Add LANGFUSE_MEDIA_UPLOAD_ENABLED to environment_variables.py to control media detection and upload.
  • Resource Management:
    • In resource_manager.py, initialize _media_upload_enabled based on LANGFUSE_MEDIA_UPLOAD_ENABLED.
    • Conditionally start media upload consumers in _initialize_instance() based on _media_upload_enabled.
  • Media Handling:
    • In media_manager.py, check _enabled before processing media in _find_and_process_media().
    • Initialize _enabled in MediaManager based on LANGFUSE_MEDIA_UPLOAD_ENABLED.

This description was created by Ellipsis for 1888ac1. You can customize this summary. It will automatically update as commits are pushed.

Greptile Summary

Disclaimer: Experimental PR review

Added new environment variable LANGFUSE_MEDIA_UPLOAD_ENABLED to control media handling functionality in the Python SDK, with a default value of 'True'.

  • Added LANGFUSE_MEDIA_UPLOAD_ENABLED environment variable definition in /langfuse/_client/environment_variables.py
  • Implemented media handling toggle in /langfuse/_task_manager/media_manager.py to skip processing when disabled
  • Modified /langfuse/_client/resource_manager.py to conditionally start media upload consumer threads based on the setting

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@hassiebp hassiebp merged commit 46b63a2 into main May 28, 2025
10 checks passed
@hassiebp hassiebp deleted the allow-disabling-multimodal-handling branch May 28, 2025 09:54
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