Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during short_term search: Error code: 502 #188

Open
netsunn opened this issue Nov 1, 2024 · 1 comment
Open

Error during short_term search: Error code: 502 #188

netsunn opened this issue Nov 1, 2024 · 1 comment

Comments

@netsunn
Copy link

netsunn commented Nov 1, 2024

hello, I use ollama to provide embedding service, here's my code, but it show error info when i run crewai: rag_storage.py-rag_storage:186 - ERROR: Error during short_term search: Error code: 502

return Crew(
agents=self.agents, # Automatically created by the @agent decorator
tasks=self.tasks, # Automatically created by the @task decorator
process=Process.sequential,
verbose=True,
# process=Process.hierarchical,
memory=True,
embedder={
"provider": "ollama",
"config": {
"model": "mxbai-embed-large",
"base_url": "http://xxx",
}
}
)

Maybe I configured the ollama's base_url wrong?

@hsarvesh
Copy link

Hello,

I was wondering for similar problem as well earlier.

you needed to load LLM from crewai in crew.py along with agent config as below:

from crewai import Agent, Crew, Process, Task, LLM

@agent
def custom_name(self) -> Agent:
return Agent(
llm=LLM(model="ollama/llama3.2", base_url="http://localhost:11434"),
config=self.agents_config['Custom_name'],
verbose=True
)

Please let me know if this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants