【求助帖】29-24.10.21-CrewAI-ollama本地模型调用报错 #274

Open
opened 2024-10-23 12:47:11 +08:00 by 12422372205cs · 1 comment

raise litellm.exceptions.BadRequestError( # type: ignore
litellm.exceptions.BadRequestError: litellm.BadRequestError: LLM Provider NOT provided. Pass in the LLM provider you are trying to call. You passed model=OllamaLLM
Params: {}
Pass model as E.g. For 'Huggingface' inference endpoints pass in completion(model='huggingface/starcoder',..) Learn more: https://docs.litellm.ai/docs/providers

  • ollama没有问题,单独测试是通过的,加在crewai项目中就报错
raise litellm.exceptions.BadRequestError( # type: ignore litellm.exceptions.BadRequestError: litellm.BadRequestError: LLM Provider NOT provided. Pass in the LLM provider you are trying to call. You passed model=OllamaLLM Params: {} Pass model as E.g. For 'Huggingface' inference endpoints pass in `completion(model='huggingface/starcoder',..)` Learn more: https://docs.litellm.ai/docs/providers - ollama没有问题,单独测试是通过的,加在crewai项目中就报错
Author

解决了
版本:crewai 0.74.2
通过查询crewai官网ollama使用方式更改如下:

from crewai import LLM
llm = LLM(
  base_url=f"http://{host}:{port}",
  model="ollama/llama3.1:latest",
)
解决了 版本:crewai 0.74.2 通过查询crewai官网ollama使用方式更改如下: ``` from crewai import LLM llm = LLM( base_url=f"http://{host}:{port}", model="ollama/llama3.1:latest", ) ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: HswOAuth/llm_course#274
No description provided.