✨ feat(manager.py): add upsert method to InMemoryCache and RedisCache to support inserting or updating cache items
🐛 fix(manager.py): fix client_id generation in handle_websocket method to avoid overwriting existing cache items
🔨 chore(manager.py): refactor handle_websocket method to use upsert method and improve readability
✨ feat(manager.py): add result_dict to cache instead of directly setting langchain_object to improve cache semantics
🐛 fix(manager.py): handle case when langchain_object is not found in cache and raise ValueError
🔒 chore(pyproject.toml): update celery, redis, and flower versions and make them optional dependencies
🔀 chore(pyproject.toml): add celery, redis, and flower to the deploy extra dependencies
🔧 fix(docker-compose.celery.yml): update uvicorn command to include debug log level
🔧 fix(docker-compose.celery.yml): update flower command to include redis broker URL
🔧 fix(docker-compose.celery.yml): add dependencies and environment variables for redis cache and queue in frontend service
✨ feat(manager.py): add support for chat cache and attach it to the chat manager for better chat history management
🔧 chore(manager.py): change client_id format in set_cache method to avoid conflicts with existing cache keys
🔧 chore(celeryconfig.py): update broker_url and result_backend to use LANGFLOW_REDIS_HOST and LANGFLOW_REDIS_PORT environment variables if available, fallback to default values if not
✨ feat(chat.py): add support for cache_manager to handle chat history and cache langchain_object
🆕 feat(chat/manager.py): add ChatManager class to handle websocket connections and chat history
🆕 feat(chat/manager.py): add ChatHistory class to manage chat history for each client
🆕 feat(chat/manager.py): add methods to handle websocket connections, send messages, and process chat messages
🆕 feat(chat/manager.py): add method to set cache for a client and handle websocket communication
🔄 refactor(cache): rename BaseCache class to BaseCacheManager for better clarity and consistency
🔄 refactor(cache): remove cache_manager from __all__ in cache module
🔄 refactor(cache): remove unused import of Service in BaseCacheManager class
🔄 refactor(cache): rename cache_manager to BaseCacheManager in factory module
🔄 refactor(cache): remove unused import of InMemoryCache in factory module
🔄 refactor(cache): remove flow module and its related code as it is no longer used
🔧 fix(manager.py): fix import statements and class inheritance in cache manager module
✨ feat(manager.py): add InMemoryCache class to implement a simple in-memory cache using an OrderedDict
✨ feat(manager.py): add RedisCache class to implement a Redis-based cache using the redis-py library
🔧 fix(endpoints.py): add error handling for processing tweaks and log the error message
✨ feat(endpoints.py): use 'process_graph_cached_worker' to process graph data asynchronously and return the result in 'ProcessResponse'
✨ feat(celery_app.py): add Celery app configuration for langflow with Redis as broker and backend
✨ feat(celeryconfig.py): add Celery configuration file with environment variable support for broker URL and result backend URL
🚧 feat(base.Dockerfile): create python-base stage with shared environment variables
🚧 feat(base.Dockerfile): create builder-base stage for building dependencies and creating virtual environment
🚧 feat(base.Dockerfile): create development stage for development and testing
🐛 fix(directory_reader.py): return False if code is not valid Python to prevent false positives
🐛 fix(directory_reader.py): fix method name from is_type_hint_used_but_not_imported to _is_type_hint_used_in_args for consistency
🐛 fix(directory_reader.py): fix method name from is_type_hint_imported to _is_type_hint_imported for consistency
🐛 fix(directory_reader.py): fix return value of _is_type_hint_used_in_args method to return False if type hint is used but not imported
🐛 fix(test_custom_component.py): update assertion to expect return_type as a list instead of a string
🐛 fix(test_vectorstore_template.py): update assertion to check if all vectorstores in settings are present in the response
🔧 chore(Metaphor.py): update search method to use the provided parameters for use_autoprompt and search_num_results
🔧 chore(Metaphor.py): update find_similar method to use the provided parameter for similar_num_results
🐛 fix(Metaphor.py): ignore type error for returning a list with mixed types
🐛 fix(Vectara.py): add condition to check if documents and embedding are not None before creating Vectara instance
🐛 fix(CustomComponent.py): change return type of get_function_entrypoint_return_type to List[str] to match the actual return value
The MetaphorToolkit component is added to the langflow toolkit. It provides functionality for searching metaphors using the Metaphor API. The component includes three tools: search, get_contents, and find_similar. The search tool allows users to search for metaphors using a query. The get_contents tool retrieves the contents of a webpage based on the ids returned from the search tool. The find_similar tool finds search results similar to a given URL returned from the search tool.
The MetaphorToolkit component is still in beta and requires a Metaphor API key to function. The API key is stored securely and can be configured in the field_config of the component. For more information, refer to the documentation: [Metaphor Toolkit Documentation](https://python.langchain.com/docs/integrations/tools/metaphor_search)
✨ feat(Vectara.py): add VectaraComponent to implement Vector Store using Vectara
🔧 chore(vectorstores): add empty __init__.py file to the vectorstores directory
🐛 fix(types.py): handle multiple return types in add_base_classes function and raise HTTPException with appropriate error message if return type is invalid
This PR is a code refactoring initiative aiming to improve the
readability and maintainability of our codebase. It specifically targets
generic or non-descriptive variable names, renaming them to more
meaningful names that better express their purpose within the code.