forked from JLX0/MetaLLM-GPT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheval.py
45 lines (42 loc) · 1.08 KB
/
eval.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import os
from base_modules.code_generator import MetaLLM_GPT
def main(
objective,
file_path,
minimum_trial,
resume=False,
input=None,
output=None,
exec_time_limit_s=60,
privilege=False,
environment=None,
infinity_mode=False,
key=None,
model="3.5",
api_call_period_s=5,
verbose=False
):
code_generator = MetaLLM_GPT(
objective = objective,
file_path = file_path,
minimum_trial = minimum_trial,
resume = resume,
input=input,
output=output,
exec_time_limit_s=exec_time_limit_s,
privilege=privilege,
environment=environment,
infinity_mode=infinity_mode,
key=key,
model=model,
api_call_period_s=api_call_period_s,
verbose=verbose)
return code_generator.run()
if __name__ == "__main__":
main(
objective="a program that output some funny joke",
file_path="exp/joke.py",
minimum_trial=2,
output="1 random funny joke from 10 jokes as stdout",
key=os.environ.get("OPENAI_API_KEY"),
)