Skip to content

Commit

Permalink
周末愉快
Browse files Browse the repository at this point in the history
+ 增加运行时自动清理ui缓存;
+ 增加gpt代理设置可为空;
+ 提高灵聚对接的稳定性。
  • Loading branch information
xszyou committed Jul 28, 2023
1 parent c99ee0c commit f8ff5a2
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 12 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Fay数字人助理版是fay开源项目的重要分支,专注于构建智能
            ├── ASR   


         [FunASR](https://www.bilibili.com/video/BV1qs4y1g74e) ─┘   │     ┌─ Yuan 1.0
         [FunASR](https://www.bilibili.com/video/BV1qs4y1g74e) ─┘    │     ┌─ Yuan 1.0

               │     ├─ [LingJu](https://www.bilibili.com/video/BV1NW4y1D76a/)

Expand All @@ -47,9 +47,9 @@ Fay数字人助理版是fay开源项目的重要分支,专注于构建智能

         Azure ─┐    │     ├─ [VisualGLM](https://www.bilibili.com/video/BV1mP411Q7mj)

        Edge TTS ─┼── TTS    └─ [RWKV](https://www.bilibili.com/video/BV1yu41157zB)
        Edge TTS ─┼── TTS     └─ [RWKV](https://www.bilibili.com/video/BV1yu41157zB)

         [开源 TTS](https://www.bilibili.com/read/cv25192534) ─┘   │    
         [开源 TTS](https://www.bilibili.com/read/cv25192534) ─┘   │    

               │    

Expand Down Expand Up @@ -120,6 +120,12 @@ Remote Android  [Live2D](https://www.bilibili.com/video/BV1sx4y1d775/?vd_sou

## **三、升级日志**

**2023.07.28:**

+ 增加运行时自动清理ui缓存;
+ 增加gpt代理设置可为空;
+ 提高灵聚对接的稳定性。

**2023.07.26:**

+ 修复连接数字人之前产生大量ws信息问题;
Expand Down
10 changes: 8 additions & 2 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ ProTip:The shopping edition has been moved to a separate branch.[`fay-sales-edit

         Azure ─┐    │     ├─ [VisualGLM](https://www.bilibili.com/video/BV1mP411Q7mj)

        Edge TTS ─┼── TTS    └─ [RWKV](https://www.bilibili.com/video/BV1yu41157zB)
        Edge TTS ─┼── TTS     └─ [RWKV](https://www.bilibili.com/video/BV1yu41157zB)

    [Open source TTS](https://www.bilibili.com/read/cv25192534) ─┘  │    

  │    
               │    

               │    

Expand Down Expand Up @@ -122,6 +122,12 @@ Message format: View [WebSocket.md](https://github.com/TheRamU/Fay/blob/main/Web

## **Upgrade Log**

**2023.07.28:**

+ Add runtime automatic cleaning of UI cache;
+ Add GPT proxy setting can be null;
+ Improve the stability of Lingju docking.

**2023.07.21:**

+ Fixed the problem of generating a large amount of WS information before connecting digital humans;
Expand Down
5 changes: 4 additions & 1 deletion ai_module/nlp_gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
def question(cont):
global count
try:
chatbot = Chatbot(model = "gpt-3.5", proxy = cfg.proxy_config, api_key = cfg.key_chatgpt_api_key)
if cfg.proxy_config != '' :
chatbot = Chatbot(proxy = cfg.proxy_config, api_key = cfg.key_chatgpt_api_key)
else:
chatbot = Chatbot(api_key = cfg.key_chatgpt_api_key)
response = chatbot.ask(cont)
count = 0
return response
Expand Down
4 changes: 2 additions & 2 deletions ai_module/nlp_lingju.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def question(self, cont):
url="https://dev.lingju.ai/httpapi/ljchat.do"
req = json.dumps({"accessToken": token, "lat": lat, "lng": lng, "input": cont})
headers = {'Content-Type':'application/json;charset=UTF-8'}
r = requests.post(url, headers=headers, data=req)
r = requests.post(url, headers=headers, verify=False, data=req)
if r.status_code != 200:
util.log(1, f"灵聚api对接有误: {r.text}")
return "哎呀,出错了!请重新发一下"
Expand Down Expand Up @@ -74,7 +74,7 @@ def __get_token(self):
cfg.load_config()
url=f"https://dev.lingju.ai/httpapi/authorize.do?appkey={cfg.key_lingju_api_key}&userid={self.userid}&authcode={cfg.key_lingju_api_authcode}"
headers = {'Content-Type':'application/json;charset=UTF-8'}
r = requests.post(url, headers=headers)
r = requests.post(url, headers=headers, verify=False)
if r.status_code != 200:
util.log(1, f"灵聚api对接有误: {r.text}")
return None
Expand Down
4 changes: 2 additions & 2 deletions gui/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def __init__(self):
# self.center()
self.browser = QWebEngineView()
#清空缓存
# profile = QWebEngineProfile.defaultProfile()
# profile.clearHttpCache()
profile = QWebEngineProfile.defaultProfile()
profile.clearHttpCache()
self.browser.load(QUrl('http://127.0.0.1:5000'))
self.setCentralWidget(self.browser)
MyThread(target=self.runnable).start()
Expand Down
5 changes: 3 additions & 2 deletions system.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ms_tts_region=
xf_ltp_app_id=
xf_ltp_api_key=

#NLP多选一:lingju、yuan、gpt、chatgpt、rasa(需启动chatglm及rasa,https://m.bilibili.com/video/BV1D14y1f7pr)、VisualGLM
#NLP多选一:lingju、yuan、gpt、chatgpt、rasa(需启动chatglm及rasa,https://m.bilibili.com/video/BV1D14y1f7pr)、VisualGLM、rwkv_api、rwkv
chat_module=lingju

#灵聚 服务密钥(NLP多选1) https://open.lingju.ai
Expand All @@ -37,7 +37,8 @@ chatgpt_api_key=
#ChatGPT对接(NLP多选1)(非必须,https://chat.openai.com登录后访问https://chat.openai.com/api/auth/session获取)
gpt_access_token=
gpt_conversation_id=
#gpt代理

#gpt代理(可为空,填写例子:http://127.0.0.1:7890)
proxy_config=http://127.0.0.1:7890

#ngrok内网穿透id,远程设备可以通过互联网连接Fay(非必须)http://ngrok.cc
Expand Down

0 comments on commit f8ff5a2

Please sign in to comment.