crewAIInc / crewAI

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
https://crewai.com
MIT License
21.2k stars 2.94k forks source link

Default Agent LLM factory Mistral/other OpenAI compatible API problem #216

Closed michaelwdombek closed 2 months ago

michaelwdombek commented 9 months ago

Hi @ all

after some discussions in discord and testing with mistral it seems that the agent setup cases some problems.

https://github.com/joaomdmoura/crewAI/blob/2f0bf3b325c86d913ec0c58a280c85120330776d/src/crewai/agent.py#L94-L99

Right now if I do not explicitly set the LLM.model value, anything that is passed as variable is getting overwritten by the default factory.

export OPENAI_API_KEY=your-mistral-api-key                                  # ok
export OPENAI_API_BASE=https://api.mistral.ai/v1                          # ok
export MODEL_NAME="mistral-medium"                                           # get over written by default factory setting model="gpt4"

I can think of two solutions:

I'm in discord up for discussion :) cheers Michael

jmbenedetto commented 9 months ago

Me too!

whoabuddy commented 9 months ago

Possibly related to #244 ?

joaomdmoura commented 9 months ago

Fixing this with a new patch and updating the docs tonight

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 2 months ago

This issue was closed because it has been stalled for 5 days with no activity.