mirror of
https://github.com/GammaTauAI/reflexion-human-eval
synced 2024-11-16 00:12:59 +00:00
.
This commit is contained in:
parent
b5aec9618f
commit
7c6a83c5a2
@ -38,6 +38,7 @@ def generic_generate_func_impl(
|
||||
if strategy == "reflexion":
|
||||
message = f"previous implementation:\n{prev_func_impl}\n\nunit tests:\n{feedback}\n\nhint:\n{self_reflection}\n\n# improved implementation\n{func_sig}"
|
||||
# func_bodies is a really bad name, as it can also be just 1 string
|
||||
print(message, flush=True)
|
||||
func_bodies = gpt_chat(model, REFLEXION_CHAT_INSTRUCTION,
|
||||
message, num_comps=num_comps, temperature=temperature)
|
||||
else:
|
||||
@ -77,6 +78,7 @@ def generic_generate_internal_tests(
|
||||
"""
|
||||
if model == "gpt-4" or model == "gpt-3.5-turbo":
|
||||
message = f'{TEST_GENERATION_FEW_SHOT}\n\nfunc signature:\n{func_sig}\nunit tests:'
|
||||
print(message, flush=True)
|
||||
output = gpt_chat(
|
||||
model, TEST_GENERATION_CHAT_INSTRUCTION, message, max_tokens=1024)
|
||||
else:
|
||||
|
29502
reflexion_mbpp_py_logs2
Normal file
29502
reflexion_mbpp_py_logs2
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
python main.py \
|
||||
--run_name "reflexion_mbpp_py" \
|
||||
--run_name "reflexion_mbpp_py3" \
|
||||
--root_dir "root" \
|
||||
--dataset_path ./benchmarks/mbpp-py.jsonl \
|
||||
--strategy "reflexion" \
|
||||
|
Loading…
Reference in New Issue
Block a user