🐛 fix(vector_store.py): add type ignore comments to suppress import errors
The import statements for the weaviate and pinecone libraries were causing import errors. Adding the `# type: ignore` comment suppresses these errors and allows the code to run without issues.
This commit is contained in:
parent
4b5c3a0c53
commit
7f90956d20
1 changed files with 2 additions and 2 deletions
|
|
@ -45,7 +45,7 @@ def initialize_supabase(class_object: Type[SupabaseVectorStore], params: dict):
|
||||||
def initialize_weaviate(class_object: Type[Weaviate], params: dict):
|
def initialize_weaviate(class_object: Type[Weaviate], params: dict):
|
||||||
"""Initialize weaviate and return the class object"""
|
"""Initialize weaviate and return the class object"""
|
||||||
if not docs_in_params(params):
|
if not docs_in_params(params):
|
||||||
import weaviate
|
import weaviate # type: ignore
|
||||||
|
|
||||||
client_kwargs_json = params.get("client_kwargs", "{}")
|
client_kwargs_json = params.get("client_kwargs", "{}")
|
||||||
client_kwargs = json.loads(client_kwargs_json)
|
client_kwargs = json.loads(client_kwargs_json)
|
||||||
|
|
@ -84,7 +84,7 @@ def initialize_faiss(class_object: Type[FAISS], params: dict):
|
||||||
def initialize_pinecone(class_object: Type[Pinecone], params: dict):
|
def initialize_pinecone(class_object: Type[Pinecone], params: dict):
|
||||||
"""Initialize pinecone and return the class object"""
|
"""Initialize pinecone and return the class object"""
|
||||||
|
|
||||||
import pinecone
|
import pinecone # type: ignore
|
||||||
|
|
||||||
pinecone_api_key = params.get("pinecone_api_key")
|
pinecone_api_key = params.get("pinecone_api_key")
|
||||||
pinecone_env = params.get("pinecone_env")
|
pinecone_env = params.get("pinecone_env")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue