(train) root@WIN-IUEXHKJBZLU:/home/luhao/Everything-of-Thoughts-XoT/xot_all_in_one# python main.py --config config/game24/single_sol/game24_single_xot_laststep0_revised0.yaml
2024-01-12 17:07:20 WIN-IUEXHKJBZLU xot.env.game24.Game24Game[30765] INFO Loading Test Environment...
[1/1] Problem: [ 3 6 9 11]
Traceback (most recent call last):
File "/home/luhao/Everything-of-Thoughts-XoT/xot_all_in_one/xot/controller/llm/models.py", line 24, in get_oai_completion
res = openai.ChatCompletion.create(
File "/root/anaconda3/envs/train/lib/python3.9/site-packages/openai/lib/_old_api.py", line 39, in __call__
raise APIRemovedInV1(symbol=self._symbol)
openai.lib._old_api.APIRemovedInV1:
You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API.
You can run `openai migrate` to automatically upgrade your codebase to use the 1.0.0 interface.
Alternatively, you can pin your installation to the old version, e.g. `pip install openai==0.28`
A detailed migration guide is available here: https://github.com/openai/openai-python/discussions/742
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/luhao/Everything-of-Thoughts-XoT/xot_all_in_one/main.py", line 43, in <module>
ctrl.run()
File "/home/luhao/Everything-of-Thoughts-XoT/xot_all_in_one/xot/controller/controller.py", line 75, in run
ys, info, revised_flag, _, model_call_list = solver.solve(idx)
File "/home/luhao/Everything-of-Thoughts-XoT/xot_all_in_one/xot/controller/solver/xot_solver.py", line 300, in solve
samples, thoughts, actions, model_call_phase1 = self.single_solve_before_revision(x)
File "/home/luhao/Everything-of-Thoughts-XoT/xot_all_in_one/xot/controller/solver/xot_solver.py", line 114, in single_solve_before_revision
samples = self.gpt(prompt, instruct, n=self.args.param.n_generate_sample, stop=self.args.gpt.stop)
File "/home/luhao/Everything-of-Thoughts-XoT/xot_all_in_one/xot/controller/llm/models.py", line 19, in chatgpt
return gpt(messages, model=model, temperature=temperature, max_tokens=max_tokens, n=n, stop=stop)
File "/home/luhao/Everything-of-Thoughts-XoT/xot_all_in_one/xot/controller/llm/models.py", line 65, in gpt
res = get_oai_completion(messages, model, temperature, max_tokens, n, stop)
File "/home/luhao/Everything-of-Thoughts-XoT/xot_all_in_one/xot/controller/llm/models.py", line 38, in get_oai_completion
except openai.error.InvalidRequestError as e:
AttributeError: module 'openai' has no attribute 'error'