From 124bfc93ed2d3702cf9d9af9ff9b5985ec2b7b45 Mon Sep 17 00:00:00 2001
From: zhaoqingang <zhaoqg0118@163.com>
Date: 星期二, 18 二月 2025 15:51:23 +0800
Subject: [PATCH] commit
---
app/service/v2/app_driver/chat_base.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/app/service/v2/app_driver/chat_base.py b/app/service/v2/app_driver/chat_base.py
index 787a89b..47211d0 100644
--- a/app/service/v2/app_driver/chat_base.py
+++ b/app/service/v2/app_driver/chat_base.py
@@ -32,9 +32,17 @@
return response
@staticmethod
+ async def http_upload_file(url, data, files, headers, timeout=300):
+ async with httpx.AsyncClient(timeout=timeout) as client:
+ response = await client.post(url, headers=headers, files=files, data=data)
+ return response
+
+
+ @staticmethod
async def get_headers(token):
return {
'Content-Type': 'application/json',
'Authorization': f'Bearer {token}'
}
+
--
Gitblit v1.8.0