eaglelandsonce commited on
Commit
57d4d70
·
1 Parent(s): 3e3ed73

Update query_solver.py

Browse files
Files changed (1) hide show
  1. query_solver.py +5 -5
query_solver.py CHANGED
@@ -1,10 +1,10 @@
1
  import sys
2
  import json
3
  import autogen
4
- from autogen.agentchat.contrib.math_user_proxy_agent import MathUserProxyAgent
5
 
6
  # Function to run the query
7
- def run_query(math_problem, api_key):
8
  config_list = [
9
  {
10
  'model': 'gpt-3.5-turbo',
@@ -39,12 +39,12 @@ def run_query(math_problem, api_key):
39
  manager = autogen.GroupChatManager(groupchat=groupchat, llm_config=llm_config)
40
 
41
 
42
- return user_proxy.initiate_chat(manager, message=math_problem)
43
 
44
 
45
  if __name__ == "__main__":
46
  input_data = json.loads(sys.stdin.read())
47
- math_problem = input_data['math_problem']
48
  api_key = input_data['api_key']
49
- result = run_query(math_problem, api_key)
50
  print(result)
 
1
  import sys
2
  import json
3
  import autogen
4
+ from autogen import config_list_from_json
5
 
6
  # Function to run the query
7
+ def run_query(programming_problem, api_key):
8
  config_list = [
9
  {
10
  'model': 'gpt-3.5-turbo',
 
39
  manager = autogen.GroupChatManager(groupchat=groupchat, llm_config=llm_config)
40
 
41
 
42
+ return user_proxy.initiate_chat(manager, message=programming_problem)
43
 
44
 
45
  if __name__ == "__main__":
46
  input_data = json.loads(sys.stdin.read())
47
+ programming_problem = input_data['programming_problem']
48
  api_key = input_data['api_key']
49
+ result = run_query(programming_problem, api_key)
50
  print(result)