curl -X POST "http://localhost:8080/upload" \
-H "Content-Type: application/json" \
-d '{
"store_mode": "text",
"embedding_model": "BAAI/bge-small-en-v1.5",
"items": [
{
"id": "doc-1",
"text": "Hello world",
"vector": [0.01, -0.02, "... 384 floats ..."]
}
]
}'
{
"status": "success",
"message": "Items uploaded successfully.",
"total": 1,
"dimension": 384,
"store_mode": "text"
}
{
"status": "failure",
"message": "Item limit exceeded: max 10000, current 10000, requested 1 new items.",
"items": 10000,
"max_items": 10000,
"requested_new": 1
}
Data Operations
Upload
Upload or replace items by id (text or vector store).
POST
/
upload
curl -X POST "http://localhost:8080/upload" \
-H "Content-Type: application/json" \
-d '{
"store_mode": "text",
"embedding_model": "BAAI/bge-small-en-v1.5",
"items": [
{
"id": "doc-1",
"text": "Hello world",
"vector": [0.01, -0.02, "... 384 floats ..."]
}
]
}'
{
"status": "success",
"message": "Items uploaded successfully.",
"total": 1,
"dimension": 384,
"store_mode": "text"
}
{
"status": "failure",
"message": "Item limit exceeded: max 10000, current 10000, requested 1 new items.",
"items": 10000,
"max_items": 10000,
"requested_new": 1
}
Overview
Upload or replace items keyed by id. Re-uploading an existing id updates the embedding and does not consume additional quota. On the first upload to an empty store,store_mode is required. Dimension and mode are locked afterward.
Each item object:
curl -X POST "http://localhost:8080/upload" \
-H "Content-Type: application/json" \
-d '{
"store_mode": "text",
"embedding_model": "BAAI/bge-small-en-v1.5",
"items": [
{
"id": "doc-1",
"text": "Hello world",
"vector": [0.01, -0.02, "... 384 floats ..."]
}
]
}'
{
"status": "success",
"message": "Items uploaded successfully.",
"total": 1,
"dimension": 384,
"store_mode": "text"
}
{
"status": "failure",
"message": "Item limit exceeded: max 10000, current 10000, requested 1 new items.",
"items": 10000,
"max_items": 10000,
"requested_new": 1
}
Related
Was this page helpful?