From 93c6c4d17dccd6c4818ca3295f509dda522a5786 Mon Sep 17 00:00:00 2001 From: kalsteve Date: Fri, 19 Jul 2024 03:13:50 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20bubble=5Fid=20stream=20=EC=A0=84?= =?UTF-8?q?=EC=86=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/bubble_service.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/bubble_service.py b/app/services/bubble_service.py index 796c1b6..3f4e817 100644 --- a/app/services/bubble_service.py +++ b/app/services/bubble_service.py @@ -121,3 +121,5 @@ async def create_bubble(chat_id: int, content: str, db: Session): # Redis에 오디오 데이터 저장 redis_client.setex(str(db_bubble_ai.id), timedelta(seconds=600), audio_data_bytes) # 생성과 동시에 10초뒤에 사라짐 + + yield f"data: {json.dumps({'bubble_id': str(db_bubble_ai.id)})}\n\n" From 2adc1da7a1cc9b72a03cf74734fdd06820f4207e Mon Sep 17 00:00:00 2001 From: kalsteve Date: Fri, 19 Jul 2024 03:14:13 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20timmer=20=EB=B9=84=ED=99=9C=EC=84=B1?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/config/langChain/langChainSetting.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/config/langChain/langChainSetting.py b/app/config/langChain/langChainSetting.py index 6799952..ac0f3bf 100644 --- a/app/config/langChain/langChainSetting.py +++ b/app/config/langChain/langChainSetting.py @@ -61,7 +61,8 @@ def get_session_history(session_id): # 메시지 히스토리를 포함하여 넣어주는 러너블 생성 runnable_with_history = RunnableWithMessageHistory( - chain_with_trimming, + # chain_with_trimming, + prompt | llm, get_session_history, input_messages_key="input", history_messages_key="chat_history",