codelion commited on
Commit
9d87d2c
1 Parent(s): 931e2e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -10,6 +10,7 @@ from optillm.self_consistency import advanced_self_consistency_approach
10
  from optillm.rstar import RStar
11
  from optillm.plansearch import plansearch
12
  from optillm.leap import leap
 
13
 
14
 
15
  API_KEY = os.environ.get("OPENROUTER_API_KEY")
@@ -59,6 +60,8 @@ def respond(message, history, model, approach, system_message, max_tokens, tempe
59
  final_response = plansearch(system_prompt, initial_query, client, model)[0]
60
  elif approach == 'leap':
61
  final_response = leap(system_prompt, initial_query, client, model)
 
 
62
 
63
  return final_response
64
 
@@ -85,7 +88,7 @@ def create_model_dropdown():
85
 
86
  def create_approach_dropdown():
87
  return gr.Dropdown(
88
- ["none", "leap", "plansearch", "rstar", "cot_reflection", "rto", "self_consistency", "z3"],
89
  value="none", label="Approach"
90
  )
91
 
 
10
  from optillm.rstar import RStar
11
  from optillm.plansearch import plansearch
12
  from optillm.leap import leap
13
+ from optillm.reread import re2_approach
14
 
15
 
16
  API_KEY = os.environ.get("OPENROUTER_API_KEY")
 
60
  final_response = plansearch(system_prompt, initial_query, client, model)[0]
61
  elif approach == 'leap':
62
  final_response = leap(system_prompt, initial_query, client, model)
63
+ elif approach == 're2':
64
+ final_response = re2_approach(system_prompt, initial_query, client, model)
65
 
66
  return final_response
67
 
 
88
 
89
  def create_approach_dropdown():
90
  return gr.Dropdown(
91
+ ["none", "leap", "plansearch", "rstar", "cot_reflection", "rto", "self_consistency", "z3", "re2"],
92
  value="none", label="Approach"
93
  )
94