From 80c37694c320a98f6d1950be5b21b54297b5f53e Mon Sep 17 00:00:00 2001 From: xszyou Date: Fri, 28 Apr 2023 21:28:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0ue5=E5=B7=A5=E7=A8=8B?= =?UTF-8?q?=E5=8C=85=E5=9C=B0=E5=9D=80=E5=8F=8Achatgpt=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 +++++++- ai_module/chatgpt.py | 10 +++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d0eaaa1..841b4f2 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,13 @@ Fay是一个完整的开源项目,包含Fay控制器及数字人模型,可 ## **推荐集成的开源仓库** -消费级pc大模型:https://github.com/THUDM/ChatGLM-6B +消费级pc大模型:https://github.com/THUDM/ChatGLM-6B + 全平台抖音抓包:https://github.com/wwengg/douyin +UE5工程:https://github.com/xszyou/fay-ue5 + + ## **一、Fay控制器用途** @@ -40,6 +44,8 @@ Fay是一个完整的开源项目,包含Fay控制器及数字人模型,可 ![](images/UElucky.png) +工程及运行包:https://github.com/xszyou/fay-ue5 + **发您的Fay运行效果视频至公众号领取最新的UE5模型哦** 通讯地址: [`ws://127.0.0.1:10002`](ws://127.0.0.1:10002)(已接通) diff --git a/ai_module/chatgpt.py b/ai_module/chatgpt.py index fd6fa20..a3b7b9d 100644 --- a/ai_module/chatgpt.py +++ b/ai_module/chatgpt.py @@ -7,8 +7,8 @@ import requests import time from utils import config_util as cfg - -chatgpt_api_key = cfg.key_chatgpt_api_key +from urllib3.exceptions import InsecureRequestWarning +requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning) #代理服务器的配置方式,参考链接https://blog.csdn.net/qq_30865917/article/details/106492549 #httpproxy此处填写你代理服务器的地址,可以把配置文件放到config_util里面,二选一 @@ -21,13 +21,13 @@ def question(cont): url= "https://api.openai.com/v1/chat/completions" session = requests.Session() + session.verify = False if proxy_flag == '1': session.proxies = { "https": "https://" + httpproxy, "http": "http://" + httpproxy } - print(session.proxies) model_engine = "gpt-3.5-turbo" @@ -48,12 +48,12 @@ def question(cont): "user":"live-virtual-digital-person" } - headers = {'content-type': 'application/json', 'Authorization': 'Bearer ' + chatgpt_api_key} + headers = {'content-type': 'application/json', 'Authorization': 'Bearer ' + cfg.key_chatgpt_api_key} starttime = time.time() try: - response = session.post(url, json=data, headers=headers) + response = session.post(url, json=data, headers=headers, verify=False) response.raise_for_status() # 检查响应状态码是否为200 result = eval(response.text)