I am using Claude 3.5 sonnet in my crew, which performed smoothly at previous crewAI versions, as:
from langchain_anthropic import ChatAnthropic Claude35 = ChatAnthropic(model="claude-3-5-sonnet-20240620", max_tokens=4000)
Now, in the latest ones (0.61.0 and 0.63.6) I get:
2024-09-26 10:12:45,211 - 140704541183936 - llm.py-llm:88 - ERROR: LiteLLM call failed: litellm.BadRequestError: LLM Provider NOT provided. Pass in the LLM provider you are trying to call. You passed model=model='claude-3-5-sonnet-20240620' anthropic_api_url='https://api.anthropic.com' anthropic_api_key=SecretStr('**********') _client=<anthropic.Anthropic object at 0x13903ec50> _async_client=<anthropic.AsyncAnthropic object at 0x138fc40d0> Pass model as E.g. For 'Huggingface' inference endpoints pass in completion(model=‘huggingface/starcoder’,…) Learn more: https://docs.litellm.ai/docs/providers
However, after running the crew I got: Traceback (most recent call last): File "<string>", line 1, in <module> File "/Users/gerasimosplegas/tierly/src/tierly/main.py", line 17, in run TierlyCrew().crew().kickoff(inputs=inputs) File "/Users/gerasimosplegas/Library/Caches/pypoetry/virtualenvs/tierly-eXmYQ2Lr-py3.11/lib/python3.11/site-packages/crewai/crew.py", line 490, in kickoff result = self._run_sequential_process() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/gerasimosplegas/Library/Caches/pypoetry/virtualenvs/tierly-eXmYQ2Lr-py3.11/lib/python3.11/site-packages/crewai/crew.py", line 594, in _run_sequential_process return self._execute_tasks(self.tasks) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/gerasimosplegas/Library/Caches/pypoetry/virtualenvs/tierly-eXmYQ2Lr-py3.11/lib/python3.11/site-packages/crewai/crew.py", line 692, in _execute_tasks task_output = task.execute_sync( ^^^^^^^^^^^^^^^^^^ File "/Users/gerasimosplegas/Library/Caches/pypoetry/virtualenvs/tierly-eXmYQ2Lr-py3.11/lib/python3.11/site-packages/crewai/task.py", line 191, in execute_sync return self._execute_core(agent, context, tools) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/gerasimosplegas/Library/Caches/pypoetry/virtualenvs/tierly-eXmYQ2Lr-py3.11/lib/python3.11/site-packages/crewai/task.py", line 255, in _execute_core task_output = TaskOutput( ^^^^^^^^^^^ File "/Users/gerasimosplegas/Library/Caches/pypoetry/virtualenvs/tierly-eXmYQ2Lr-py3.11/lib/python3.11/site-packages/pydantic/main.py", line 212, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pydantic_core._pydantic_core.ValidationError: 1 validation error for TaskOutput json_dict Input should be a valid dictionary [type=dict_type, input_value="The JSON you provided is...ready to be used as is.", input_type=str] For further information visit https://errors.pydantic.dev/2.9/v/dict_type