更新ue5工程包地址及chatgpt接口

This commit is contained in:
xszyou 2023-04-28 21:28:41 +08:00
parent 604cab787b
commit 80c37694c3
2 changed files with 12 additions and 6 deletions

View File

@ -11,8 +11,12 @@ Fay是一个完整的开源项目包含Fay控制器及数字人模型
## **推荐集成的开源仓库**
消费级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)(已接通)

View File

@ -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)