add documentation for 'Insert with ID'
Browse files
README.md
CHANGED
@@ -545,6 +545,20 @@ The `insert_batch_size` parameter in `addon_params` controls how many documents
|
|
545 |
|
546 |
</details>
|
547 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
548 |
|
549 |
<details>
|
550 |
<summary><b>Incremental Insert</b></summary>
|
|
|
545 |
|
546 |
</details>
|
547 |
|
548 |
+
<details>
|
549 |
+
<summary> <b> Insert with ID </b></summary>
|
550 |
+
|
551 |
+
If you want to provide your own IDs for your documents, number of documents and number of IDs must be the same.
|
552 |
+
|
553 |
+
```python
|
554 |
+
# Insert single text, and provide ID for it
|
555 |
+
rag.insert("TEXT1", ids=["ID_FOR_TEXT1"])
|
556 |
+
|
557 |
+
# Insert multiple texts, and provide IDs for them
|
558 |
+
rag.insert(["TEXT1", "TEXT2",...], ids=["ID_FOR_TEXT1", "ID_FOR_TEXT2"])
|
559 |
+
```
|
560 |
+
|
561 |
+
</details>
|
562 |
|
563 |
<details>
|
564 |
<summary><b>Incremental Insert</b></summary>
|