From 3c054040077c236f6ad872a8eeec365f1e11be5d Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 3 Sep 2024 15:39:37 +0000 Subject: [PATCH 1/2] Ensure the 'inputs' field in /chat-messages takes effect every time --- api/core/app/apps/chat/app_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/app/apps/chat/app_generator.py b/api/core/app/apps/chat/app_generator.py index 5b896e2845534..ad7b030f5c3cd 100644 --- a/api/core/app/apps/chat/app_generator.py +++ b/api/core/app/apps/chat/app_generator.py @@ -116,7 +116,7 @@ def generate( app_config=app_config, model_conf=ModelConfigConverter.convert(app_config), conversation_id=conversation.id if conversation else None, - inputs=conversation.inputs if conversation else self._get_cleaned_inputs(inputs, app_config), + inputs=self._get_cleaned_inputs(inputs, app_config), query=query, files=file_objs, user_id=user.id, From da809f32fc02169cf63639cfe5b3bda7f23a9c02 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 4 Sep 2024 03:34:31 +0000 Subject: [PATCH 2/2] Ensure the 'inputs' field in /chat-messages takes effect every time --- api/core/app/apps/advanced_chat/app_generator.py | 2 +- api/core/app/apps/agent_chat/app_generator.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/app/apps/advanced_chat/app_generator.py b/api/core/app/apps/advanced_chat/app_generator.py index e7c9ebe09749d..c49b2e620a050 100644 --- a/api/core/app/apps/advanced_chat/app_generator.py +++ b/api/core/app/apps/advanced_chat/app_generator.py @@ -129,7 +129,7 @@ def generate( task_id=str(uuid.uuid4()), app_config=app_config, conversation_id=conversation.id if conversation else None, - inputs=conversation.inputs if conversation else self._get_cleaned_inputs(inputs, app_config), + inputs=self._get_cleaned_inputs(inputs, app_config), query=query, files=file_objs, user_id=user.id, diff --git a/api/core/app/apps/agent_chat/app_generator.py b/api/core/app/apps/agent_chat/app_generator.py index daf37f4a50dd3..5be978148bd09 100644 --- a/api/core/app/apps/agent_chat/app_generator.py +++ b/api/core/app/apps/agent_chat/app_generator.py @@ -137,7 +137,7 @@ def generate(self, app_model: App, app_config=app_config, model_conf=ModelConfigConverter.convert(app_config), conversation_id=conversation.id if conversation else None, - inputs=conversation.inputs if conversation else self._get_cleaned_inputs(inputs, app_config), + inputs=self._get_cleaned_inputs(inputs, app_config), query=query, files=file_objs, user_id=user.id,