MeetKai / functionary

Chat language model that can use tools and interpret the results
MIT License
1.37k stars 107 forks source link

No module named 'lmformatenforcer' #197

Open Mars-1990 opened 4 months ago

Mars-1990 commented 4 months ago

Traceback (most recent call last): File "/home/hirpa/fzq/2024/code/functionary/server_vllm.py", line 39, in from functionary.vllm_inference import process_chat_completion File "/home/hirpa/fzq/2024/code/functionary/functionary/vllm_inference.py", line 13, in from functionary.inference import enforce_tool_choice, prepare_messages_for_inference File "/home/hirpa/fzq/2024/code/functionary/functionary/inference.py", line 4, in from lmformatenforcer import CharacterLevelParser, JsonSchemaParser ModuleNotFoundError: No module named 'lmformatenforcer'

jeffrey-fong commented 4 months ago

Can you try again after running pip install requirements.txt to download the latest dependencies? lm-format-enforcer is one of the dependencies of vLLM and should be installed when installing the vLLM version (v0.4.1) in our requirements.txt. I believe you should be using an older version of vLLM instead. Let me know if the problem persists.