Eladlev commited on
Commit
39ac8db
·
verified ·
1 Parent(s): 339560f

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -93,6 +93,8 @@ with gr.Blocks() as demo:
93
 
94
 
95
  def update_serper_api(serper_api):
 
 
96
  os.environ["SERPER_API_KEY"] = serper_api
97
  search = GoogleSerperAPIWrapper()
98
  global tools
@@ -110,6 +112,8 @@ with gr.Blocks() as demo:
110
 
111
  def update_agent(openai_key):
112
  os.environ['OPENAI_API_KEY'] = openai_key
 
 
113
  llm = ChatOpenAI(temperature=0, model_name='gpt-4o', openai_api_key=os.environ['OPENAI_API_KEY'])
114
  agent = create_tool_calling_agent(llm, tools, agent_prompt)
115
  global agent_executor
 
93
 
94
 
95
  def update_serper_api(serper_api):
96
+ print(os.environ['OPENAI_API_KEY'])
97
+ print(serper_api)
98
  os.environ["SERPER_API_KEY"] = serper_api
99
  search = GoogleSerperAPIWrapper()
100
  global tools
 
112
 
113
  def update_agent(openai_key):
114
  os.environ['OPENAI_API_KEY'] = openai_key
115
+ print(os.environ['OPENAI_API_KEY'])
116
+ global llm
117
  llm = ChatOpenAI(temperature=0, model_name='gpt-4o', openai_api_key=os.environ['OPENAI_API_KEY'])
118
  agent = create_tool_calling_agent(llm, tools, agent_prompt)
119
  global agent_executor