File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -869,9 +869,7 @@ def set_vector_db(
869869) -> None :
870870 """Sets the vector db configuration for the rag corpus."""
871871 if vector_db is None :
872- rag_corpus .rag_vector_db_config = GapicRagVectorDbConfig (
873- rag_managed_db = GapicRagVectorDbConfig .RagManagedDb (),
874- )
872+ rag_corpus .rag_vector_db_config = GapicRagVectorDbConfig ()
875873 elif isinstance (vector_db , RagManagedDb ):
876874 rag_corpus .rag_vector_db_config = GapicRagVectorDbConfig (
877875 rag_managed_db = _convert_rag_managed_db_to_gapic (vector_db )
Original file line number Diff line number Diff line change @@ -648,7 +648,7 @@ def set_backend_config(
648648
649649 if backend_config .vector_db is not None :
650650 vector_config = backend_config .vector_db
651- if vector_config is None or isinstance (vector_config , RagManagedDb ):
651+ if isinstance (vector_config , RagManagedDb ):
652652 rag_corpus .vector_db_config .rag_managed_db .CopyFrom (
653653 GapicRagVectorDbConfig .RagManagedDb ()
654654 )
@@ -668,7 +668,7 @@ def set_backend_config(
668668 rag_corpus .vector_db_config .api_auth .api_key_config .api_key_secret_version = (
669669 api_key
670670 )
671- else :
671+ elif vector_config is not None :
672672 raise TypeError (
673673 "backend_config must be a VertexFeatureStore,"
674674 "RagManagedDb, or Pinecone."
You can’t perform that action at this time.
0 commit comments