shibbir24 commited on
Commit
daa7a96
·
verified ·
1 Parent(s): ff3a1db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,7 +2,7 @@ import os
2
  import streamlit as st
3
  import time
4
  from metrics_tracker import MetricsTracker
5
- from tool_handler import agent # PySpur agent handles tool routing
6
 
7
  # Load vector DB from ZIP on startup
8
  import embedding
@@ -80,9 +80,9 @@ with st.container():
80
  start_time = time.time()
81
  st.session_state.chat_history.append({"user": user_query})
82
 
83
- # Use PySpur agent to handle routing
84
  try:
85
- response = agent.run(user_query, model=selected_model, use_rag=rag_toggle)
86
  routed_correctly = True
87
  except Exception as e:
88
  response = f"Error handling query: {str(e)}"
 
2
  import streamlit as st
3
  import time
4
  from metrics_tracker import MetricsTracker
5
+ from tool_handler import run_tool # Use PySpur-integrated run_tool function
6
 
7
  # Load vector DB from ZIP on startup
8
  import embedding
 
80
  start_time = time.time()
81
  st.session_state.chat_history.append({"user": user_query})
82
 
83
+ # Use PySpur-compatible tool runner
84
  try:
85
+ response = run_tool(user_query, model=selected_model, use_rag=rag_toggle)
86
  routed_correctly = True
87
  except Exception as e:
88
  response = f"Error handling query: {str(e)}"