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
commit 1d9cc5ca05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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")