i am using the ChatGoogleGenerativeAI as an LLM. but every time i want to execute my code. i will get the following error:
Value error, Please provide an OpenAI API key. You can get one at https://platform.openai.com/account/api-keys [type=value_error, input_value={'agents': [Agent(role=Us...': True, 'memory': True}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/value_error
i do not why but i am using my cutom LLM and still getting this error. I have pass the LLm to the agents.
I found that i have to pass my custom llm not only to the agents but also to the crew. You may also need to provide an “api_key” even if not required by your LLM Backend but just to not get the OpenAI API KEy error.
I would recommend you to use this way
Agent(…,…,
llm=LLM(model=“ollama/mistral”, base_url=“http://127.0.0.1:11434”)
)
I used mistral you can give your model name according to your need.
If no API key is required then dont add anything just skip giving random things in API Itself.