AetherCortex / Llama-X

Open Academic Research on Improving LLaMA to SOTA LLM
Apache License 2.0
1.59k stars 101 forks source link

utils.py and openai==0.8.0 TypeError: 'type' object is not subscriptable #33

Open zql022 opened 11 months ago

zql022 commented 11 months ago

this code ./src/utils.py line 47 return_text=False in def openai_completion( prompts: Union[str, Sequence[str], Sequence[dict[str, str]], dict[str, str]], decoding_args: OpenAIDecodingArguments, model_name="text-davinci-003", sleep_time=2, batch_size=1, max_instances=sys.maxsize, max_batches=sys.maxsize, return_text=False, shows this error: File "train.py", line 27, in import utils File "/home/llama/Llama-X-main/src/utils.py", line 47, in return_text=False, TypeError: 'type' object is not subscriptable

my openai==0.8.0,deepspeed==0.10.0,and other pip in requirements.txt , After changed the transformer version to 4.29.2 but i can't slove this error, maybe some pip version are not true, if anyone have some suggestion, please leave your comment here,thank you very much!

dongguanting commented 8 months ago

@zql022 have you solved it, i have same problem.