|
|
|
|
|
|
|
|
import requests |
|
|
import requests |
|
|
from requests.auth import HTTPDigestAuth |
|
|
from requests.auth import HTTPDigestAuth |
|
|
|
|
|
|
|
|
|
|
|
from configs import dify_config |
|
|
from extensions.ext_database import db |
|
|
from extensions.ext_database import db |
|
|
from extensions.ext_redis import redis_client |
|
|
from extensions.ext_redis import redis_client |
|
|
from models.dataset import TidbAuthBinding |
|
|
from models.dataset import TidbAuthBinding |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
spending_limit = { |
|
|
spending_limit = { |
|
|
"monthly": 10, |
|
|
|
|
|
|
|
|
"monthly": dify_config.TIDB_SPEND_LIMIT, |
|
|
} |
|
|
} |
|
|
password = str(uuid.uuid4()).replace("-", "")[:16] |
|
|
password = str(uuid.uuid4()).replace("-", "")[:16] |
|
|
display_name = str(uuid.uuid4()).replace("-", "") |
|
|
display_name = str(uuid.uuid4()).replace("-", "") |