mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
fix: pinecone insert issue
This commit is contained in:
parent
9aea18f90c
commit
21094ca88b
1 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue