From fb9194df24b9b4307f9e3791f2094d65aa92632b Mon Sep 17 00:00:00 2001 From: "tuyang.yhj" Date: Tue, 4 Jul 2023 14:07:01 +0800 Subject: [PATCH] WEB API independent --- pilot/openapi/api_v1/api_v1.py | 2 +- pilot/scene/chat_knowledge/v1/chat.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pilot/openapi/api_v1/api_v1.py b/pilot/openapi/api_v1/api_v1.py index 414d3cfad..49d726c5f 100644 --- a/pilot/openapi/api_v1/api_v1.py +++ b/pilot/openapi/api_v1/api_v1.py @@ -118,7 +118,7 @@ async def dialogue_list( user_id: str = None): ) dialogues.append(conv_vo) - return Result[ConversationVo].succ(dialogues[-10:][::-1]) + return Result[ConversationVo].succ(dialogues[-10:]) @router.post("/v1/chat/dialogue/scenes", response_model=Result[List[ChatSceneVo]]) diff --git a/pilot/scene/chat_knowledge/v1/chat.py b/pilot/scene/chat_knowledge/v1/chat.py index e142a5245..646672f1f 100644 --- a/pilot/scene/chat_knowledge/v1/chat.py +++ b/pilot/scene/chat_knowledge/v1/chat.py @@ -25,7 +25,7 @@ CFG = Config() class ChatKnowledge(BaseChat): - chat_scene: str = ChatScene.ChatKnowledge.value + chat_scene: str = ChatScene.ChatKnowledge.value() """Number of results to return from the query"""