chore: Migrating VectorDB to use OpenAI compatible identifier

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
Francisco Javier Arceo 2025-07-03 22:02:06 -04:00
parent b094960199
commit ddb29b306c
9 changed files with 44 additions and 22 deletions

View file

@ -19,6 +19,7 @@ class VectorDB(Resource):
embedding_model: str
embedding_dimension: int
provider_vector_db_name: str | None = None
@property
def vector_db_id(self) -> str:
@ -71,6 +72,7 @@ class VectorDBs(Protocol):
embedding_dimension: int | None = 384,
provider_id: str | None = None,
provider_vector_db_id: str | None = None,
provider_vector_db_name: str | None = None,
) -> VectorDB:
"""Register a vector database.
@ -79,6 +81,7 @@ class VectorDBs(Protocol):
:param embedding_dimension: The dimension of the embedding model.
:param provider_id: The identifier of the provider.
:param provider_vector_db_id: The identifier of the vector database in the provider.
:param provider_vector_db_name: The name of the vector database.
:returns: A VectorDB.
"""
...

View file

@ -346,7 +346,7 @@ class VectorIO(Protocol):
embedding_model: str | None = None,
embedding_dimension: int | None = 384,
provider_id: str | None = None,
provider_vector_db_id: str | None = None,
provider_vector_db_id: str = "",
) -> VectorStoreObject:
"""Creates a vector store.