Closed mxdlzg closed 2 months ago
I am also getting this type of error
Hi,
We recommend you to use TrustLLM by git clone instead of pip install. We have not updated pypi.
I also got this error in main branch.
@YangWang92 @eyb12 @mxdlzg Hi, We are fixing it and we will update the code within one day. Stay tuned.
@HowieHwong @eyb12 @mxdlzg Hi all, I fixed it. Just install google.generativeai 0.5.4 to aviod this error, google.generativeai updated its api.
pip install google.generativeai==0.5.4
my pull resquest https://github.com/HowieHwong/TrustLLM/pull/40
Connected to pydev debugger (build 241.17011.127) Traceback (most recent call last): File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "D:\OwnProgram\Anaconda3\envs\FairLLM\Lib\site-packages\trustllm\generation\generation.py", line 4, in
from trustllm.utils.generation_utils import *
File "D:\OwnProgram\Anaconda3\envs\FairLLM\Lib\site-packages\trustllm\utils\generation_utils.py", line 22, in
{"category": safety_types.HarmCategory.HARM_CATEGORY_DEROGATORY, "threshold": safety_types.HarmBlockThreshold.BLOCK_NONE},
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\OwnProgram\Anaconda3\envs\FairLLM\Lib\enum.py", line 786, in getattr
raise AttributeError(name) from None
AttributeError: HARM_CATEGORY_DEROGATORY
python-BaseException