From ce9fb375be9a551b4cdc5cb78a759fbcea1eac22 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 21 十一月 2024 20:13:04 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/rag-gateway

---
 app/service/basic.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/service/basic.py b/app/service/basic.py
index f3e5db5..33e5f86 100644
--- a/app/service/basic.py
+++ b/app/service/basic.py
@@ -1,5 +1,7 @@
 import httpx
 
+from Log import logger
+
 
 class BasicService:
     def __init__(self, base_url: str):
@@ -73,13 +75,15 @@
                 else:
                     yield f"Error: {response.status_code}"
 
-    async def questions_talk(self, chat_id: str):
+    async def questions_talk(self,question, chat_id: str):
+        logger.error("---------------questions_talk--------------------------")
         url = f"{self.base_url}/questions/talk"
         params = {'chat_id': chat_id}
         headers = {'Content-Type': 'text/plain'}
-        async with httpx.AsyncClient() as client:
+        async with httpx.AsyncClient(timeout=1800) as client:
             response = await client.post(
                 url,
+                data=question,
                 headers=headers,
                 params=params
             )

--
Gitblit v1.8.0