fix: pinecone insert issue

This commit is contained in:
Timothy Jaeryang Baek 2025-08-11 16:22:58 +04:00
parent 9aea18f90c
commit 21094ca88b

View file

@ -32,6 +32,8 @@ from open_webui.config import (
PINECONE_CLOUD, PINECONE_CLOUD,
) )
from open_webui.env import SRC_LOG_LEVELS from open_webui.env import SRC_LOG_LEVELS
from open_webui.retrieval.vector.utils import stringify_metadata
NO_LIMIT = 10000 # Reasonable limit to avoid overwhelming the system NO_LIMIT = 10000 # Reasonable limit to avoid overwhelming the system
BATCH_SIZE = 100 # Recommended batch size for Pinecone operations BATCH_SIZE = 100 # Recommended batch size for Pinecone operations
@ -183,7 +185,7 @@ class PineconeClient(VectorDBBase):
point = { point = {
"id": item["id"], "id": item["id"],
"values": item["vector"], "values": item["vector"],
"metadata": metadata, "metadata": stringify_metadata(metadata),
} }
points.append(point) points.append(point)
return points return points