Skip to content

Commit

Permalink
add cache ux
Browse files Browse the repository at this point in the history
  • Loading branch information
milovate committed Dec 18, 2024
1 parent 6ee37e0 commit 634e593
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion daras_ai_v2/doc_search_settings_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def bulk_documents_uploader(
accept=accept,
accept_multiple_files=True,
)
gui.checkbox("Submit Links in Bulk", key=f"__custom_checkbox_{key}")
gui.checkbox("Show as Links", key=f"__custom_checkbox_{key}")
documents = gui.session_state.setdefault(key, [])
try:
documents = list(_expand_gdrive_folders(documents))
Expand Down
24 changes: 22 additions & 2 deletions recipes/VideoBots.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,28 @@ def render_settings(self):
)

citation_style_selector()
gui.checkbox("🔗 Shorten Citation URLs", key="use_url_shortener")

gui.checkbox("🔗 Shorten citation links", key="use_url_shortener")

gui.write("###### Cache")
gui.caption(
f"""
By default we embed your knowledge files & links and cache their contents for fast responses.
"""
)
col1, col2 = gui.columns(2,style={"alignItems": "center"})
with col1:
gui.checkbox(
"Always Check for Updates",
help="With each incoming message, documents and links will be checked for changes and re-indexed. Slower but useful for dynamic webpages, Google Sheets, Docs, etc that change often.",
tooltip_placement="bottom",

)
with col2:
with gui.tooltip("Clear the knowledge cache and re-index all knowledge base files and links."):
gui.button(
"♻️ Refresh Cache",
type="tertiary",
)
doc_extract_selector(self.request.user)

gui.write("---")
Expand Down

0 comments on commit 634e593

Please sign in to comment.