From 3edf08c7e482f32bc1db0cc9786b64e17b097000 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期五, 22 十一月 2024 17:06:09 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/rag-gateway --- app/service/basic.py | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/service/basic.py b/app/service/basic.py index 9c22206..259b905 100644 --- a/app/service/basic.py +++ b/app/service/basic.py @@ -44,12 +44,11 @@ url = f"{self.base_url}/exceltalk/download/excel" return await self.download_from_url(url, params={'excel_name': file_id}) - async def excel_talk_upload(self, chat_id: str, filename: str, file_content: bytes): + async def excel_talk_upload(self, chat_id: str, files): url = f"{self.base_url}/exceltalk/upload/files" params = {'chat_id': chat_id, 'is_col': '0'} - # 鍒涘缓 FormData 瀵硅薄 - files = [('files', (filename, file_content, 'application/octet-stream'))] + async with httpx.AsyncClient() as client: response = await client.post( @@ -103,7 +102,7 @@ async def questions_talk_word_download(self, file_id: str): url = f"{self.base_url}/questions/download/word" - return await self.download_from_url(url, params={'excel_name': file_id}) + return await self.download_from_url(url, params={'word_name': file_id}) def process_buffer(data, buffer): -- Gitblit v1.8.0