Skip to content

Commit

Permalink
fix: 修改调试页面多轮对话设置无效问题 (#945)
Browse files Browse the repository at this point in the history
(cherry picked from commit e59e262)
  • Loading branch information
shaohuzhang1 committed Aug 7, 2024
1 parent 452213e commit 349328f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions apps/application/serializers/chat_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from application.serializers.application_serializers import ModelDatasetAssociation, DatasetSettingSerializer, \
ModelSettingSerializer
from application.serializers.chat_message_serializers import ChatInfo
from common.config.embedding_config import ModelManage
from common.constants.permission_constants import RoleConstants
from common.db.search import native_search, native_page_search, page_search, get_dynamics_model
from common.event import ListenerManagement
Expand All @@ -40,8 +39,6 @@
from dataset.models import Document, Problem, Paragraph, ProblemParagraphMapping
from dataset.serializers.common_serializers import get_embedding_model_by_dataset_id
from dataset.serializers.paragraph_serializers import ParagraphSerializers
from setting.models import Model
from setting.models_provider import get_model
from smartdoc.conf import PROJECT_DIR

chat_cache = caches['chat_cache']
Expand Down Expand Up @@ -312,7 +309,8 @@ def open(self):
chat_id = str(uuid.uuid1())
model_id = self.data.get('model_id')
dataset_id_list = self.data.get('dataset_id_list')
application = Application(id=None, dialogue_number=3, model_id=model_id,
dialogue_number = 3 if self.data.get('multiple_rounds_dialogue', False) else 0
application = Application(id=None, dialogue_number=dialogue_number, model_id=model_id,
dataset_setting=self.data.get('dataset_setting'),
model_setting=self.data.get('model_setting'),
problem_optimization=self.data.get('problem_optimization'),
Expand Down

0 comments on commit 349328f

Please sign in to comment.