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
20.9k stars 2.9k forks source link

[BUG] Crews not running on `o1-preview` or `o1-mini` #1323

Closed felipesaezreyes closed 1 month ago

felipesaezreyes commented 1 month ago

Description

I defined the model to o1-preview or o1-mini and temperature to 1, and I get the following error

Error code: 400 - {\'error\': {\'message\': "Unsupported parameter: \'stop\' is not supported with this model.", \'type\': \'invalid_request_error\', \'param\': \'stop\', \'code\': \'unsupported_parameter\'}}

Apparently the stop parameter is used, and is not supported. I didn't find a way for the crew to no use this parameter

Steps to Reproduce

Define LLM for an agent as

llm=ChatOpenAI(model_name="o1-preview", temperature=1)

run the crew.

Expected behavior

Agent executes without error

Screenshots/Code snippets

llm=ChatOpenAI(model_name="o1-preview", temperature=1)

Operating System

macOS Sonoma

Python Version

3.12

crewAI Version

0.51.1

crewAI Tools Version

0.51.1

Virtual Environment

Venv

Evidence

Error code: 400 - {\'error\': {\'message\': "Unsupported parameter: \'stop\' is not supported with this model.", \'type\': \'invalid_request_error\', \'param\': \'stop\', \'code\': \'unsupported_parameter\'}}

Possible Solution

make stop parameter optional?

Additional context

.

zinyando commented 1 month ago

Is this really a bug? If a model doesn't support an attribute eg temperature maybe just don't put it?

Which behavior were you expecting?

felipesaezreyes commented 1 month ago

If temperature is not set, it uses the default 0.7 and it errors out, hence why I set it as 1.

That's not the issue here, but the fact that it uses the stop parameter which isn't supported. I didn't find a way for it to not use the stop parameter

felipesaezreyes commented 1 month ago

this issue appears to be covered by this PR https://github.com/crewAIInc/crewAI/pull/1322

joaomdmoura commented 1 month ago

Yup, once #1322 this shoudl be good

joaomdmoura commented 1 month ago

Fixed not on 0.63.6 should work :D