Shakeel401 commited on
Commit
8ed2eac
·
verified ·
1 Parent(s): 9555a63

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +3 -2
agent.py CHANGED
@@ -97,8 +97,9 @@ async def run_agent_query(user_query: str, thread_id: str):
97
  if not thread_id:
98
  raise ValueError("thread_id is required and must be provided by the UI.")
99
 
100
- os.makedirs("tmp", exist_ok=True)
 
101
  # ✅ Initialize SQLite session
102
  session = SQLiteSession(thread_id, "tmp/conversations.db")
103
 
104
- return await Runner.run(agent, user_query, session=session)
 
97
  if not thread_id:
98
  raise ValueError("thread_id is required and must be provided by the UI.")
99
 
100
+ os.makedirs("tmp", exist_ok=True)
101
+
102
  # ✅ Initialize SQLite session
103
  session = SQLiteSession(thread_id, "tmp/conversations.db")
104
 
105
+ return await Runner.run(agent, user_query, session=session)