Updating file_id to follow OpenAI format

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
This commit is contained in:
Francisco Javier Arceo 2025-07-03 14:03:12 -04:00
parent 9253529d9a
commit 85cc16e572

View file

@ -147,7 +147,7 @@ class OpenAIVectorStoreMixin(ABC):
provider_vector_db_id: str | None = None, provider_vector_db_id: str | None = None,
) -> VectorStoreObject: ) -> VectorStoreObject:
"""Creates a vector store.""" """Creates a vector store."""
store_id = name or str(uuid.uuid4()) store_id = f"vs_{str(uuid.uuid4())}"
created_at = int(time.time()) created_at = int(time.time())
if provider_id is None: if provider_id is None:
@ -186,7 +186,7 @@ class OpenAIVectorStoreMixin(ABC):
"id": store_id, "id": store_id,
"object": "vector_store", "object": "vector_store",
"created_at": created_at, "created_at": created_at,
"name": store_id, "name": name,
"usage_bytes": 0, "usage_bytes": 0,
"file_counts": file_counts.model_dump(), "file_counts": file_counts.model_dump(),
"status": status, "status": status,