bstraehle commited on
Commit
1bdaa3f
·
1 Parent(s): 6727bfd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -33,12 +33,15 @@ def invoke(openai_api_key, prompt):
33
  result = ""
34
 
35
  try:
 
36
  llm = ChatOpenAI(model_name = config["model_name"],
37
  openai_api_key = openai_api_key,
38
  temperature = config["temperature"])
39
 
 
40
  tools = load_tools(["llm-math"], llm = llm)
41
 
 
42
  agent = initialize_agent(
43
  tools, # + [time],
44
  llm,
@@ -46,7 +49,8 @@ def invoke(openai_api_key, prompt):
46
  handle_parsing_errors = True,
47
  verbose = True)
48
 
49
- #result = agent(prompt)
 
50
 
51
  #content = completion.choices[0].message.content
52
  except Exception as e:
 
33
  result = ""
34
 
35
  try:
36
+ print("111")
37
  llm = ChatOpenAI(model_name = config["model_name"],
38
  openai_api_key = openai_api_key,
39
  temperature = config["temperature"])
40
 
41
+ print("222")
42
  tools = load_tools(["llm-math"], llm = llm)
43
 
44
+ print("333")
45
  agent = initialize_agent(
46
  tools, # + [time],
47
  llm,
 
49
  handle_parsing_errors = True,
50
  verbose = True)
51
 
52
+ print("444")
53
+ result = agent(prompt)
54
 
55
  #content = completion.choices[0].message.content
56
  except Exception as e: