mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-28 15:02:37 +00:00
simplyfing
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
parent
d361154102
commit
cfde4af3ab
5 changed files with 5 additions and 10 deletions
2
docs/_static/llama-stack-spec.html
vendored
2
docs/_static/llama-stack-spec.html
vendored
|
@ -15624,7 +15624,7 @@
|
|||
},
|
||||
"vector_db_name": {
|
||||
"type": "string",
|
||||
"description": "The name of the vector database. :param provider_vector_db_id: The identifier of the vector database in the provider."
|
||||
"description": "The name of the vector database."
|
||||
},
|
||||
"provider_vector_db_id": {
|
||||
"type": "string",
|
||||
|
|
4
docs/_static/llama-stack-spec.yaml
vendored
4
docs/_static/llama-stack-spec.yaml
vendored
|
@ -10933,9 +10933,7 @@ components:
|
|||
description: The identifier of the provider.
|
||||
vector_db_name:
|
||||
type: string
|
||||
description: >-
|
||||
The name of the vector database. :param provider_vector_db_id: The identifier
|
||||
of the vector database in the provider.
|
||||
description: The name of the vector database.
|
||||
provider_vector_db_id:
|
||||
type: string
|
||||
description: >-
|
||||
|
|
|
@ -82,7 +82,7 @@ class VectorDBs(Protocol):
|
|||
:param embedding_dimension: The dimension of the embedding model.
|
||||
:param provider_id: The identifier of the provider.
|
||||
:param vector_db_name: The name of the vector database.
|
||||
:param provider_vector_db_id: The identifier of the vector database in the provider.
|
||||
:param provider_vector_db_id: The identifier of the vector database in the provider.
|
||||
:returns: A VectorDB.
|
||||
"""
|
||||
...
|
||||
|
|
|
@ -8,6 +8,7 @@ import asyncio
|
|||
import logging
|
||||
import mimetypes
|
||||
import time
|
||||
import uuid
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Any
|
||||
|
||||
|
@ -148,7 +149,7 @@ class OpenAIVectorStoreMixin(ABC):
|
|||
"""Creates a vector store."""
|
||||
created_at = int(time.time())
|
||||
if provider_vector_db_id is None:
|
||||
raise ValueError("Provider vector DB ID is required")
|
||||
provider_vector_db_id = f"vs_{uuid.uuid4()}"
|
||||
|
||||
if provider_id is None:
|
||||
raise ValueError("Provider ID is required")
|
||||
|
|
|
@ -53,7 +53,6 @@ def test_vector_db_retrieve(client_with_empty_registry, embedding_model_id, embe
|
|||
vector_db_id=vector_db_id,
|
||||
embedding_model=embedding_model_id,
|
||||
embedding_dimension=embedding_dimension,
|
||||
provider_vector_db_id=vector_db_id,
|
||||
)
|
||||
|
||||
# Retrieve the memory bank and validate its properties
|
||||
|
@ -70,7 +69,6 @@ def test_vector_db_register(client_with_empty_registry, embedding_model_id, embe
|
|||
vector_db_id=vector_db_id,
|
||||
embedding_model=embedding_model_id,
|
||||
embedding_dimension=embedding_dimension,
|
||||
provider_vector_db_id=vector_db_id,
|
||||
)
|
||||
|
||||
vector_dbs_after_register = [vector_db.identifier for vector_db in client_with_empty_registry.vector_dbs.list()]
|
||||
|
@ -98,7 +96,6 @@ def test_insert_chunks(client_with_empty_registry, embedding_model_id, embedding
|
|||
vector_db_id=vector_db_id,
|
||||
embedding_model=embedding_model_id,
|
||||
embedding_dimension=embedding_dimension,
|
||||
provider_vector_db_id=vector_db_id,
|
||||
)
|
||||
|
||||
client_with_empty_registry.vector_io.insert(
|
||||
|
@ -134,7 +131,6 @@ def test_insert_chunks_with_precomputed_embeddings(client_with_empty_registry, e
|
|||
vector_db_id=vector_db_id,
|
||||
embedding_model=embedding_model_id,
|
||||
embedding_dimension=embedding_dimension,
|
||||
provider_vector_db_id=vector_db_id,
|
||||
)
|
||||
|
||||
chunks_with_embeddings = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue