Skip to content

Commit

Permalink
更新ue5工程包地址及chatgpt接口
Browse files Browse the repository at this point in the history
  • Loading branch information
xszyou committed Apr 28, 2023
1 parent 604cab7 commit 80c3769
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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控制器用途**

Expand Down Expand Up @@ -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)(已接通)
Expand Down
10 changes: 5 additions & 5 deletions ai_module/chatgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
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里面,二选一
Expand All @@ -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"
Expand All @@ -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)
Expand Down

0 comments on commit 80c3769

Please sign in to comment.