mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 03:16:51 +08:00
chore: remove redundant casting flask app config into dict (#2564)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, cast
|
||||
from typing import Any
|
||||
|
||||
from flask import current_app
|
||||
|
||||
@@ -14,7 +14,7 @@ class Keyword:
|
||||
self._keyword_processor = self._init_keyword()
|
||||
|
||||
def _init_keyword(self) -> BaseKeyword:
|
||||
config = cast(dict, current_app.config)
|
||||
config = current_app.config
|
||||
keyword_type = config.get('KEYWORD_STORE')
|
||||
|
||||
if not keyword_type:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import json
|
||||
from typing import Any, cast
|
||||
from typing import Any
|
||||
|
||||
from flask import current_app
|
||||
|
||||
@@ -23,7 +23,7 @@ class Vector:
|
||||
self._vector_processor = self._init_vector()
|
||||
|
||||
def _init_vector(self) -> BaseVector:
|
||||
config = cast(dict, current_app.config)
|
||||
config = current_app.config
|
||||
vector_type = config.get('VECTOR_STORE')
|
||||
|
||||
if self._dataset.index_struct_dict:
|
||||
|
||||
Reference in New Issue
Block a user