From 70de1476c33341b0bd0f8a1b8ed5590b57090d10 Mon Sep 17 00:00:00 2001 From: PiochU19 <792954018@wp.pl> Date: Thu, 20 Feb 2025 10:38:09 +0100 Subject: [PATCH] add documentation for 'Insert with ID' --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 9a518d8d..cf1ee8ca 100644 --- a/README.md +++ b/README.md @@ -545,6 +545,20 @@ The `insert_batch_size` parameter in `addon_params` controls how many documents +
+ Insert with ID + +If you want to provide your own IDs for your documents, number of documents and number of IDs must be the same. + +```python +# Insert single text, and provide ID for it +rag.insert("TEXT1", ids=["ID_FOR_TEXT1"]) + +# Insert multiple texts, and provide IDs for them +rag.insert(["TEXT1", "TEXT2",...], ids=["ID_FOR_TEXT1", "ID_FOR_TEXT2"]) +``` + +
Incremental Insert