feat: refactor tongyi models (#3496)

This commit is contained in:
takatost 2024-04-15 22:28:32 +08:00 • committed by GitHub
commit 5b447d61a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 639 additions and 177 deletions

View file

@ -1,7 +1,5 @@
import os
from werkzeug.exceptions import Unauthorized
if not os.environ.get("DEBUG") or os.environ.get("DEBUG").lower() != 'true':
from gevent import monkey
@ -11,10 +9,6 @@ if not os.environ.get("DEBUG") or os.environ.get("DEBUG").lower() != 'true':
grpc.experimental.gevent.init_gevent()
import langchain
langchain.verbose = True
import json
import logging
import threading
@ -24,6 +18,7 @@ import warnings
from flask import Flask, Response, request
from flask_cors import CORS
from werkzeug.exceptions import Unauthorized
from commands import register_commands
from config import CloudEditionConfig, Config
from extensions import (