From 0650b889a36d9b9fd42415b9b9819676f839ae9b Mon Sep 17 00:00:00 2001
From: zhaoqingang <zhaoqg0118@163.com>
Date: 星期二, 08 四月 2025 09:54:09 +0800
Subject: [PATCH] 首页会话-模型修改

---
 app/service/v2/app_driver/chat_base.py |   14 ++++++++++++++
 1 files changed, 14 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..ee23911 100644
--- a/app/service/v2/app_driver/chat_base.py
+++ b/app/service/v2/app_driver/chat_base.py
@@ -32,9 +32,23 @@
             return response
 
     @staticmethod
+    async def http_put(url, data, headers, timeout=300):
+        async with httpx.AsyncClient(timeout=timeout) as client:
+            response = await client.put(url, json=data, headers=headers)
+            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