mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-23 16:23:56 +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
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue