Преглед на файлове

chore: Update the value of sys.dialogue_count to start from 1. (#25905)

tags/1.9.0
Novice преди 1 месец
родител
ревизия
8f86f5749d
No account linked to committer's email address
променени са 2 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 3
    1
      api/core/app/apps/advanced_chat/app_generator.py
  2. 1
    1
      api/services/workflow_service.py

+ 3
- 1
api/core/app/apps/advanced_chat/app_generator.py Целия файл

@@ -420,7 +420,9 @@ class AdvancedChatAppGenerator(MessageBasedAppGenerator):
db.session.refresh(conversation)

# get conversation dialogue count
self._dialogue_count = get_thread_messages_length(conversation.id)
# NOTE: dialogue_count should not start from 0,
# because during the first conversation, dialogue_count should be 1.
self._dialogue_count = get_thread_messages_length(conversation.id) + 1

# init queue manager
queue_manager = MessageBasedAppQueueManager(

+ 1
- 1
api/services/workflow_service.py Целия файл

@@ -1008,7 +1008,7 @@ def _setup_variable_pool(
if workflow.type != WorkflowType.WORKFLOW.value:
system_variable.query = query
system_variable.conversation_id = conversation_id
system_variable.dialogue_count = 0
system_variable.dialogue_count = 1
else:
system_variable = SystemVariable.empty()


Loading…
Отказ
Запис