Description
Description
When running an example of using memory from CrewAI documentation, I got this error:
raise NotFoundError(
litellm.exceptions.NotFoundError: litellm.NotFoundError: NotFoundError: OpenAIException - Error code: 404 - {'error': {'code': '404', 'message': 'Resource not found'}}
Steps to Reproduce
Below is my code:
from crewai import Agent, Task, Crew, Process
base_url = 'xyz'
api_version = 'xyz'
api_key = 'xyz'
from crewai import LLM
llm = LLM(
model="azure/gpt-4o-mini",
api_key=api_key,
api_base=base_url
)
azure_embed_config = {
"provider": "azure",
"config": {
"model": "text-embedding-ada-002",
"api_key": api_key,
"api_base": base_url,
"api_version": api_version,
"api_type": "azure",
}
}
Define your agents
researcher = Agent(
role="Researcher",
goal="Conduct thorough research and analysis on AI and AI agents",
backstory="You're an expert researcher, specialized in technology, software engineering, AI, and startups. You work as a freelancer and are currently researching for a new client.",
allow_delegation=False,
memory=True,
llm=llm,
)
writer = Agent(
role="Senior Writer",
goal="Create compelling content about AI and AI agents",
backstory="You're a senior writer, specialized in technology, software engineering, AI, and startups. You work as a freelancer and are currently writing content for a new client.",
allow_delegation=False,
memory=True,
)
Define your task
task = Task(
description="Generate a list of 5 interesting ideas for an article, then write one captivating paragraph for each idea that showcases the potential of a full article on this topic. Return the list of ideas with their paragraphs and your notes.",
expected_output="5 bullet points, each with a paragraph and accompanying notes.",
agent=researcher
)
Define the manager agent
manager = Agent(
role="Project Manager",
goal="Efficiently manage the crew and ensure high-quality task completion",
backstory="You're an experienced project manager, skilled in overseeing complex projects and guiding teams to success. Your role is to coordinate the efforts of the crew members, ensuring that each task is completed on time and to the highest standard.",
allow_delegation=True,
memory=True,
)
crew = Crew(
agents=[researcher, writer],
tasks=[task],
manager_agent=manager,
process=Process.hierarchical,
memory=True,
verbose=True,
embedder=azure_embed_config,
manager_llm=llm,
)
Start the crew's work
result = crew.kickoff()
Expected behavior
See feedbacks of using memory
Screenshots/Code snippets
See the code above
Operating System
macOS Sonoma
Python Version
3.10
crewAI Version
0.102
crewAI Tools Version
0.36
Virtual Environment
Conda
Evidence
See the code above
Possible Solution
None
Additional context
None