mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-23 12:21:08 +00:00
fix(datasource): Fix datasource resource error
This commit is contained in:
parent
948a93be32
commit
6acfb162e4
@ -39,6 +39,7 @@ class DBResource(Resource[P], Generic[P]):
|
||||
dialect: Optional[str] = None,
|
||||
executor: Optional[Executor] = None,
|
||||
prompt_template: str = _DEFAULT_PROMPT_TEMPLATE,
|
||||
**kwargs,
|
||||
):
|
||||
"""Initialize the DB resource."""
|
||||
self._name = name
|
||||
|
@ -66,7 +66,7 @@ def _generate_key_from_password(
|
||||
algorithm=hashes.SHA256(),
|
||||
length=32,
|
||||
salt=salt,
|
||||
iterations=100000,
|
||||
iterations=800000,
|
||||
)
|
||||
key = base64.urlsafe_b64encode(kdf.derive(password))
|
||||
return key, salt
|
||||
|
Loading…
Reference in New Issue
Block a user