This commit modifies the AppClients class to remove the Content-Type header if it is explicitly set to None, particularly for file uploads. This change enhances the robustness of the async code by ensuring proper header management during API requests, aligning with the project's focus on well-documented and maintainable code.
This commit updates the settings for LANGFLOW_INGEST_FLOW_ID to remove reliance on a deprecated environment variable. It introduces a new Langflow HTTP client for making API requests and adds a centralized method for handling Langflow API requests, improving code organization and maintainability. The changes enhance the robustness of the async code while ensuring proper documentation practices are followed.
This commit introduces backwards compatibility for the flow ID by allowing the use of the deprecated FLOW_ID environment variable while issuing deprecation warnings. Additionally, the API key generation process has been improved with validation checks for cached keys and enhanced error handling. The Langflow client initialization has been updated to ensure proper handling of environment variables, contributing to a more robust and well-documented codebase.
This commit refactors the import statements in settings.py, enhancing the organization and readability of the code. The changes include consolidating and reordering imports, which contributes to a cleaner and more maintainable codebase.