Skip to content

Commit ca0c30f

Browse files
committed
chore(docs): sdk-py update
1 parent 1072de2 commit ca0c30f

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

docs/pages/sdk.mdx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,11 +463,21 @@ for example, a github repository.
463463

464464
</Tab>
465465
<Tab>
466+
To update data in the Python SDK, you can:
466467

467-
Update is not well maintained yet in the Python SDK, please ping louis030195 on [Discord](https://discord.gg/3X6xZtZ) if you need it
468-
and we will make it happen instantly!
468+
1. Use the `update()` method by providing the document IDs and new data:
469+
```py
470+
updated_docs = [
471+
Document(id="document1", data="Updated Document 1"),
472+
Document(id="document2", data="Updated Document 2"),
473+
]
474+
updated_results = await async_ds.update(updated_docs)
475+
```
476+
This will update the data for the documents with the given IDs, while keeping all other fields intact.
477+
478+
2. Create a new dataset from scratch if you have access to all the data again. For example, if you're ingesting data from a GitHub repository on each run.
469479

470-
In the meantime check [how to do it using REST](https://docs.embedbase.xyz/interface#updating-data)
480+
Note that the `replace()` method does not exist in the Python SDK, feel free to contact us if you need it.
471481
</Tab>
472482
</Tabs>
473483

0 commit comments

Comments
 (0)