Vidhi00 commited on
Commit
2b9f43c
·
verified ·
1 Parent(s): c8771df

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -507,15 +507,15 @@ def chatbot_interface():
507
  tools = [sql_tool,defer_to_human, rag, register_feedback, days_since]
508
 
509
 
510
- # chatbot = ChatOpenAI(
511
- # openai_api_base=endpoint,
512
- # openai_api_key=api_key,
513
- # model="gpt-4o-mini",
514
- # streaming=False, # Explicitly disabling streaming
515
- # temperature=0
516
- # )
517
-
518
- agent = create_tool_calling_agent(client, tools, prompt)
519
  agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)
520
 
521
  # Display chat messages from history on app rerun
 
507
  tools = [sql_tool,defer_to_human, rag, register_feedback, days_since]
508
 
509
 
510
+ chatbot = ChatOpenAI(
511
+ openai_api_base=endpoint,
512
+ openai_api_key=api_key,
513
+ model="gpt-4o-mini",
514
+ streaming=False, # Explicitly disabling streaming
515
+ temperature=0
516
+ )
517
+
518
+ agent = create_tool_calling_agent(chatbot, tools, prompt)
519
  agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)
520
 
521
  # Display chat messages from history on app rerun