I need to use Azure OpenAI Gpt-4o-mini API for my crewai agents, I am struggling with errors only and I can;t find Documentation

import os
from crewai import Agent, Task, Crew, Process
from langchain_openai import ChatOpenAI
from dotenv import load_dotenv

load_dotenv()

azure_endpoint = os.getenv(‘AZURE_OPENAI_ENDPOINT’) # e.g., “https://.openai.azure.com/”
azure_key = os.getenv(‘AZURE_OPENAI_API_KEY’) # Your API key
azure_version = os.getenv(‘OPENAI_API_VERSION’) # Use a supported API version
azure_model = os.getenv(‘AZURE_OPENAI_DEPLOYMENT’) # e.g., “gpt-4”

llm = ChatOpenAI(
model=azure_model,
api_version=azure_version,
api_key=azure_key,
# azure_endpoint=open_ai_base,
base_url=azure_endpoint,
)

Create agents

web_scraper_agent = Agent(
role=‘India Data Retrieval Agent’,
goal=‘Gather comprehensive data about India from the web.’,
backstory=‘’‘You are an expert in web scraping and data collection. Your job is to retrieve
relevant information about India, including its demographics, economy,
culture, recent news, and geopolitical stance.’‘’,
verbose=True,
llm=llm
)

Define tasks

web_scraper_task = Task(
description=‘Scrape and compile all relevant data about India from various sources.’,
expected_output=‘A structured dataset containing information about India’s demographics, economy, culture, and news.’,
agent=web_scraper_agent,
output_file=‘data.txt’
)

Assemble a crew

crew = Crew(
agents=[web_scraper_agent],
tasks=[web_scraper_task],
verbose=True,
)

Execute tasks

result = crew.kickoff()
print(result)

with open(‘results.txt’, ‘w’) as f:
f.write(result)

Help me with any Documentation. Thank you

@tonykipkemboi Please help me with this, how to use Azure OpenAI API with Crewai