You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ProjectSourceCreation] Error: Error upserting data: {"succ_index":[],"err_index":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54],"status":{"error_code":"IllegalArgument","reason":"upsert can not assign primary field data when auto id enabled langchain_primaryid: invalid parameter","code":1100,"retriable":false,"detail":"upsert can not assign primary field data when auto id enabled langchain_primaryid: invalid parameter"},"IDs":null,"acknowledged":false,"insert_cnt":"0","delete_cnt":"0","upsert_cnt":"0","timestamp":"0"} at Milvus.addVectors (/Users/zergling/Documents/projects/ai/jitera_ai/node_modules/@langchain/community/dist/vectorstores/milvus.cjs:247:19) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Milvus.addDocuments (/Users/zergling/Documents/projects/ai/jitera_ai/node_modules/@langchain/community/dist/vectorstores/milvus.cjs:177:9) at MilvusEmbedding.indexDocuments (/Users/zergling/Documents/projects/ai/jitera_ai/packages/ai-core/src/embeddings/milvus/index.ts:338:7)
Description
Index new document issues (even i do not assign langchain_primaryid)
"upsert can not assign primary field data when auto id enabled langchain_primaryid: invalid parameter"
The error you're encountering is due to the autoId property being enabled while trying to assign a primary field value. By default, autoId is set to true in the Milvus vector store integration within LangChain.js [1].
To resolve this issue, you have two options:
Disable autoId: If you want to manually assign primary field values, you need to set autoId to false. Ensure that the primary field value is provided in the metadata of each document.
Example:
constvectorStore=newMilvus({autoId: false,// other configurations...});awaitvectorStore.addDocuments([newDocument({pageContent: 'test',metadata: {langchain_primaryid: 'unique_id_1'}})]);
Remove Primary Field from Metadata: If you prefer to keep autoId enabled, ensure that you do not assign a primary field value in the metadata.
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
[ProjectSourceCreation] Error: Error upserting data: {"succ_index":[],"err_index":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54],"status":{"error_code":"IllegalArgument","reason":"upsert can not assign primary field data when auto id enabled langchain_primaryid: invalid parameter","code":1100,"retriable":false,"detail":"upsert can not assign primary field data when auto id enabled langchain_primaryid: invalid parameter"},"IDs":null,"acknowledged":false,"insert_cnt":"0","delete_cnt":"0","upsert_cnt":"0","timestamp":"0"} at Milvus.addVectors (/Users/zergling/Documents/projects/ai/jitera_ai/node_modules/@langchain/community/dist/vectorstores/milvus.cjs:247:19) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Milvus.addDocuments (/Users/zergling/Documents/projects/ai/jitera_ai/node_modules/@langchain/community/dist/vectorstores/milvus.cjs:177:9) at MilvusEmbedding.indexDocuments (/Users/zergling/Documents/projects/ai/jitera_ai/packages/ai-core/src/embeddings/milvus/index.ts:338:7)
Description
"upsert can not assign primary field data when auto id enabled langchain_primaryid: invalid parameter"
System Info
Milvus 2.4.4
The text was updated successfully, but these errors were encountered: