fix: universal chat when default model invalid (#905)

This commit is contained in:
takatost
2023-08-18 16:20:42 +08:00
committed by GitHub
parent edb06f6aed
commit 1d9cc5ca05
8 changed files with 59 additions and 32 deletions

View File

@@ -153,9 +153,3 @@ def get_remote_ip(request):
def generate_text_hash(text: str) -> str:
hash_text = str(text) + 'None'
return sha256(hash_text.encode()).hexdigest()
def get_current_datetime(type: str) -> str:
# get current time
current_time = datetime.utcnow()
return current_time.strftime("%Y-%m-%d %H:%M:%S UTC+0000 %A")