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
19.1k stars 2.64k forks source link

CrewAI doesn't support gpt-3.5-turbo model #417

Closed Mampha closed 2 weeks ago

Mampha commented 5 months ago

I was super pumped or happy to use CrewAI in my project but unfortunately it doesn't support gpt-3.5-turbo. Here is the code I used to change the base model which I guess is Gpt-4 to gpt-3.5-turbo "OpenAIGPTModel = ChatOpenAI( model_name='gpt-3.5-turbo', # Loading GPT-3.5-turbo temperature=0.1 )" but it doesn't work out. It gave this error in the terminal " I encountered an error while trying to use the tool. This was the error: Error code: 404 - {'error': {'message': 'The model gpt-4 does not exist or you do not have access to it.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}. Tool Delegate work to co-worker accepts these inputs: Delegate work to co-worker(coworker: str, task: str, context: str) - Delegate a specific task to one of the following co-workers: ['YouTube Manager', 'YouTube Research Manager', 'Email Creator', 'Title Creator', 'Description Creator'] The input to this tool should be the coworker, the task you want them to do, and ALL necessary context to exectue the task, they know nothing about the task, so share absolute everything you know, don't reference things but instead explain them." Please help me out incase there is an alternative method to use gpt-3.5-turbo

AdovaX commented 5 months ago

why dont u use 'gpt-4' ?

Mampha commented 5 months ago

Thanks for getting in touch @AdovaX . There is a restriction on payment card in my country. I have a dollar prepaid card but OpenAI doesn't accept a dollar prepaid card but a credit card which I don't have at the moment.

theCyberTech commented 5 months ago

Can you try - gpt-3.5-turbo-0125 as your model and also also how have you setup your API key?

Mampha commented 5 months ago

@theCyberTech thanks for your response. I used this code: OpenAIGpt = ChatOpenAI { model_name: "gpt-3.5-turbo", temperature: 0.1

} My OpenAI key is already in .env file and with ChatOpenAI class I don't need to specify my api key in the code block.

Pmejna commented 5 months ago

Hi @Mampha . I also encountered this bug, while setting up the name for the model by creating ChatOpenAI instance and using it in agents. The documentation states: It dynamically fetches the model name from the OPENAI_MODEL_NAME environment variable. I have set up the env variable in my file as I don't want to use the GPT-4 (too expensive for testing) os.environ['OPENAI_MODEL_NAME'] = 'gpt-3.5-turbo-0125' This worked for me.

github-actions[bot] commented 3 weeks 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 weeks ago

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