crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

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

Open felipesaezreyes opened this issue 2 years ago • 5 comments

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

.

felipesaezreyes avatar Sep 13 '24 14:09 felipesaezreyes

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?

zinyando avatar Sep 13 '24 17:09 zinyando

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 avatar Sep 13 '24 17:09 felipesaezreyes

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

felipesaezreyes avatar Sep 13 '24 21:09 felipesaezreyes

Yup, once #1322 this shoudl be good

joaomdmoura avatar Sep 14 '24 05:09 joaomdmoura

Fixed not on 0.63.6 should work :D

joaomdmoura avatar Sep 25 '24 03:09 joaomdmoura