Skip to content

Commit

Permalink
Add reset capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashacker committed Sep 4, 2024
1 parent 4547320 commit 8ac9540
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ All notable changes to this project will be documented in this file.
- Added Suggestion View
- Reworked Suggestion logic
- Added VoyageAI
- Added custom metadata
- Added DocumentExplorer with

- Content View
- Chunk View
- Vector View
- Visualize vectors of chunks of one or multiple documents
- PCA
- t-SNE
- UMAP

-

## [1.0.3]

Expand Down
16 changes: 12 additions & 4 deletions goldenverba/server/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,13 @@ def start(port, host, prod, workers):
default="",
help="Deployment (Local, Weaviate, Docker)",
)
@click.option(
"--full_reset",
default=False,
help="Full reset (True, False)",
)
@cli.command()
def reset(url, api_key, deployment):
def reset(url, api_key, deployment, full_reset):
"""
Run the FastAPI application.
"""
Expand Down Expand Up @@ -93,9 +98,12 @@ async def async_reset():
else:
raise ValueError("Invalid deployment")

await manager.reset_rag_config(client)
await manager.reset_theme_config(client)
await manager.reset_user_config(client)
if not full_reset:
await manager.reset_rag_config(client)
await manager.reset_theme_config(client)
await manager.reset_user_config(client)
else:
await manager.weaviate_manager.delete_all(client)

await client.close()

Expand Down

0 comments on commit 8ac9540

Please sign in to comment.