🔧 chore(manager.py): refactor generate_key method to use a separate build_key method for better separation of concerns
🔧 chore(manager.py): refactor update_session method to use the build_key method for better separation of concerns
🔧 chore(manager.py): refactor clear_session method to use the build_key method for better separation of concerns
🔧 chore(manager.py): add type hinting for cache_manager parameter in the __init__ method for better code clarity
ℹ️ This commit adds a new node called "Basic Chat with Prompt and History (2)" to the chat application. This node is responsible for creating a simple chat interface with a custom prompt template and a conversational memory buffer.
The node configuration includes various properties such as callbacks, cache, client, max_retries, max_tokens, metadata, model_kwargs, model_name, n, openai_api_base, openai_api_key, openai_organization, openai_proxy, and more.
This new node enhances the chat functionality by providing a more interactive and dynamic chat experience for users.
📝 chore(tests): add BasicChatwithPromptandHistory.json test data file for testing purposes
🔧 fix(test_endpoints.py): remove unused imports and trailing whitespace
✅ test(test_endpoints.py): add test for basic chat in process endpoint to verify correct response and session_id generation
✅ test(test_endpoints.py): add test for basic chat with different session_ids to verify correct response
✅ test(test_endpoints.py): add test for basic chat with two session_ids and names to verify correct response
🔧 chore(conftest.py): add pytest fixture for loading JSON flow with prompt and history
🔧 chore(conftest.py): add pytest fixture for adding a flow with prompt and history to the database
✨ feat(test_endpoints.py): add mock function for update_total_uses to fix test_process_flow_invalid_api_key
✨ feat(test_endpoints.py): add mock function for update_total_uses to fix test_process_flow_without_autologin
✨ feat(test_endpoints.py): add mock function for update_total_uses to fix test_process_flow_fails_autologin_off
This pull request introduces a series of enhancements to our recently
revamped login page, streamlining the user experience. These changes
were meticulously designed and developed to ensure a seamless login
process for our users while adhering to the highest standards of
usability and privacy.
🐛 fix(validate.py): set frontend_node to None instead of an empty dictionary in post_validate_prompt function to align with the default value in ValidatePromptRequest class
✨ feat(test_endpoints.py): change mock_process_graph_cached function to be async and return a Result object instead of a tuple to improve code readability and maintainability
🔧 fix(process.py): add Result dataclass to encapsulate result and session_id for session-based processing
🔧 fix(manager.py): remove unused method clear_session in SessionManager
✨ feat(chat.py): add dependency injection for ChatManager in chat and init_build routes to improve modularity and testability
🔧 fix(chat.py): remove duplicate instantiation of ChatManager in chat and init_build routes to improve efficiency
🔧 fix(chat.py): remove duplicate instantiation of ChatManager in stream_build route to improve efficiency
🔧 fix(utils.py): add missing import for ChatManager in get_chat_manager function
🐛 fix(flows.py): change update_flow function signature to include settings_manager as a dependency to improve code readability
🐛 fix(login.py): change auto_login function signature to include settings_manager as a dependency to improve code readability
🐛 fix(users.py): change add_user function signature to include session as a dependency to improve code readability
🐛 fix(users.py): change read_all_users function signature to include session as a dependency to improve code readability
🐛 fix(users.py): change patch_user function signature to include session as a dependency to improve code readability
🐛 fix(users.py): change delete_user function signature to include session as a dependency to improve code readability
🐛 fix(users.py): change add_super_user_for_testing_purposes_delete_me_before_merge_into_dev function signature to include session as a dependency to improve code readability
✨ feat(endpoints.py): add support for launching tasks using task manager to improve task management
🐛 fix(endpoints.py): change process_graph_cached_task function call to use task_manager.launch_task to fix AttributeError
🐛 fix(endpoints.py): change process_flow function to use task_manager.get_task to fix AttributeError
🐛 fix(endpoints.py): change get_task_status function to use task_manager.get_task to fix AttributeError
🐛 fix(process.py): change process_graph_cached function to be async to fix TypeError
✨ feat(manager.py): add support for task manager service in the service manager initialization process
✨ feat(schema.py): add task manager service type to the ServiceType enum
🔨 refactor(factory.py): add type hinting for settings_manager parameter in create method of CacheManagerFactory
🔨 refactor(manager.py): remove inheritance of Service class from InMemoryCache and RedisCache to simplify class hierarchy
✨ feat(locustfile.py): add x-api-key header to requests for authentication
🐛 fix(locustfile.py): provide default value for FLOW_ID environment variable to prevent errors
🐛 fix(task): update get_task_status function in TaskManager class to return the correct task status
🔧 chore(task): add AsyncIOTaskResult class to handle asyncio tasks and get their status and result
🔧 chore(task): add get_celery_worker_status function to get the status of the Celery worker