Skip to content

Commit

Permalink
fix: rag config.json
Browse files Browse the repository at this point in the history
  • Loading branch information
tjbck committed May 18, 2024
1 parent 7facfa3 commit 400bfa5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/apps/rag/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,12 +433,12 @@ async def update_query_settings(
form_data: QuerySettingsForm, user=Depends(get_admin_user)
):
app.state.config.RAG_TEMPLATE = (
form_data.template if form_data.template else RAG_TEMPLATE,
form_data.template if form_data.template else RAG_TEMPLATE
)
app.state.config.TOP_K = form_data.k if form_data.k else 4
app.state.config.RELEVANCE_THRESHOLD = form_data.r if form_data.r else 0.0
app.state.config.ENABLE_RAG_HYBRID_SEARCH = (
form_data.hybrid if form_data.hybrid else False,
form_data.hybrid if form_data.hybrid else False
)
return {
"status": True,
Expand Down

0 comments on commit 400bfa5

Please sign in to comment.