crab
crab copied to clipboard
[BUG] Name error during importing when camel is not installed
What version of camel are you using?
0.1.2
System information
pass
Problem description
When camel
extra is not installed, the type annotation in camel_model.py
will cause Name Error.
https://github.com/camel-ai/crab/blob/48b6f4e66c8451f39cd7da5eeb785c5f9f935bd7/crab/agents/backend_models/camel_model.py
Reproducible example code
The Python snippets:
Command lines:
Extra dependencies:
Steps to reproduce:
Traceback
Traceback (most recent call last):
File "/home/dandan/.pyenv/versions/3.10.12/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/dandan/.pyenv/versions/3.10.12/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/dandan/Programs/crab-publish/crab-benchmark-v0/main.py", line 27, in <module>
from crab.agents.backend_models import ClaudeModel, GeminiModel, OpenAIModel
File "/home/dandan/Programs/crab-publish/crab/agents/backend_models/__init__.py", line 15, in <module>
from .camel_model import CamelModel
File "/home/dandan/Programs/crab-publish/crab/agents/backend_models/camel_model.py", line 37, in <module>
def find_model_platform_type(model_platform_name: str) -> ModelPlatformType:
NameError: name 'ModelPlatformType' is not defined
Expected behavior
No response
Additional context
No response