Skip to content

Commit

Permalink
Merge pull request #519 from Ikaros-521/owner
Browse files Browse the repository at this point in the history
新增 极地极光UI配色;修复api 聊天模式相关bug
  • Loading branch information
Ikaros-521 authored Dec 17, 2023
2 parents 14aa93d + 8c0b8e9 commit eb121b6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
12 changes: 7 additions & 5 deletions api.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging, os, sys, json
import threading
import schedule
import schedule, time
import random
import aiohttp, asyncio
import traceback
Expand Down Expand Up @@ -1394,9 +1394,11 @@ def run_live(self):
# 冷却时间 0.3 秒
cooldown = 0.3
last_pressed = 0

stop_do_listen_and_comment_thread_event = threading.Event()

signal.signal(signal.SIGINT, exit_handler)
signal.signal(signal.SIGTERM, exit_handler)
# signal.signal(signal.SIGINT, exit_handler)
# signal.signal(signal.SIGTERM, exit_handler)

# 录音功能(录音时间过短进入openai的语音转文字会报错,请一定注意)
def record_audio():
Expand Down Expand Up @@ -2026,7 +2028,7 @@ def sys_cmd():
if data_json['type'] == 'run':
"""
{
"type": "factory",
"type": "run",
"data": {
"config_path": "config.json"
}
Expand All @@ -2037,7 +2039,7 @@ def sys_cmd():
elif data_json['type'] =='stop':
"""
{
"type": "factory",
"type": "stop",
"data": {
"config_path": "config.json"
}
Expand Down
5 changes: 5 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,11 @@
"login_card": "width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;position: fixed;left: 0;top: 0;",
"tab_panel": "",
"card": "margin:10px 0px;"
},
"极地极光": {
"login_card": "background:linear-gradient(45deg, #027333, #025959);width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;position: fixed;left: 0;top: 0;",
"tab_panel": "background: linear-gradient(45deg, #027333, #025959);",
"card": "margin:10px 0px;background: linear-gradient(45deg, #027333, #04D939);"
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions config.json.bak
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,11 @@
"login_card": "width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;position: fixed;left: 0;top: 0;",
"tab_panel": "",
"card": "margin:10px 0px;"
},
"极地极光": {
"login_card": "background:linear-gradient(45deg, #027333, #025959);width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;position: fixed;left: 0;top: 0;",
"tab_panel": "background: linear-gradient(45deg, #027333, #025959);",
"card": "margin:10px 0px;background: linear-gradient(45deg, #027333, #04D939);"
}
}
}
Expand Down

0 comments on commit eb121b6

Please sign in to comment.