Skip to content

Commit e417dee

Browse files
committed
Update optillm.py
1 parent 45ef6bf commit e417dee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

optillm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from optillm.cot_reflection import cot_reflection
1818
from optillm.plansearch import plansearch
1919
from optillm.leap import leap
20+
from optillm.reread import re2_approach
2021

2122
# Setup logging
2223
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
@@ -69,7 +70,7 @@
6970

7071
# List of known approaches
7172
known_approaches = ["mcts", "bon", "moa", "rto", "z3", "self_consistency", "pvg", "rstar",
72-
"cot_reflection", "plansearch", "leap"]
73+
"cot_reflection", "plansearch", "leap", "re2"]
7374

7475
# Optional API key configuration to secure the proxy
7576
@app.before_request
@@ -149,6 +150,8 @@ def proxy():
149150
final_response = plansearch(system_prompt, initial_query, client, model, n=n)
150151
elif approach == 'leap':
151152
final_response = leap(system_prompt, initial_query, client, model)
153+
elif approach == 're2':
154+
final_response = re2_approach(system_prompt, initial_query, client, model, n=n)
152155
else:
153156
raise ValueError(f"Unknown approach: {approach}")
154157
except Exception as e:

0 commit comments

Comments
 (0)