mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-13 23:52:46 +00:00
[WIP] Configurable distance_metric:
- Configurable distance_metric enabled for PGVector. - Added plumbing to support configuring more distance metrics for each vector provider.
This commit is contained in:
parent
658fb2c777
commit
9658581cf7
11 changed files with 187 additions and 18 deletions
|
|
@ -49,6 +49,7 @@ class VectorStoresRoutingTable(CommonRoutingTableImpl):
|
|||
provider_id: str | None = None,
|
||||
provider_vector_store_id: str | None = None,
|
||||
vector_store_name: str | None = None,
|
||||
distance_metric: str | None = None,
|
||||
) -> Any:
|
||||
if provider_id is None:
|
||||
if len(self.impls_by_provider_id) > 0:
|
||||
|
|
@ -73,6 +74,7 @@ class VectorStoresRoutingTable(CommonRoutingTableImpl):
|
|||
embedding_model=embedding_model,
|
||||
embedding_dimension=embedding_dimension,
|
||||
vector_store_name=vector_store_name,
|
||||
distance_metric=distance_metric,
|
||||
)
|
||||
await self.register_object(vector_store)
|
||||
return vector_store
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue