feat: reset (#169)

This commit is contained in:
cachho
2023-07-06 21:15:01 +02:00
committed by GitHub
parent 4adb6d5da1
commit f3888cc7a8
2 changed files with 17 additions and 0 deletions

View File

@@ -323,6 +323,15 @@ All options for query and...
*coming soon*
## Other methods
### Reset
Resets the database and deletes all embeddings. Irreversible. Requires reinitialization afterwards.
```python
app.reset()
```
# How does it work?
Creating a chat bot over any dataset needs the following steps to happen

View File

@@ -299,6 +299,14 @@ class EmbedChain:
return prompt
def reset(self):
"""
Resets the database. Deletes all embeddings irreversibly.
`App` has to be reinitialized after using this method.
"""
self.db_client.reset()
class App(EmbedChain):
"""
The EmbedChain app.