ERROR: LiteLLM call failed: litellm.APIError: APIError: GroqException - Connection error.
Description
i have created project using command
crewai create crew project folder name
After editing script as per my requirements when Im runniung the code using crewai run Im getting above error
I have use chatgroq from langchain_groq as well crewai class LLM. Any lead will be appreciated
Steps to Reproduce
No
Expected behavior
markdown report
Screenshots/Code snippets
@CrewBase class QuestionCrew(): """KPIs questions discovery crew"""
agents_config = 'config/questions/agents.yaml'
tasks_config = 'config/questions/tasks.yaml'
# @llm
# def llm_model(self):
# return ChatGroq(model="groq/llama-3.1-70b-versatile",
# api_key=os.environ.get("GROQ_API_KEY"),
# max_tokens=8000,
# temperature=0,
# )
# @llm
# def llm_model(self):
# return openai.OpenAI(
# base_url="https://api.groq.com/openai/v1",
# api_key=os.environ.get("GROQ_API_KEY"),
# )
@llm
def llm_model(self):
return LLM(model="groq/llama-3.1-70b-versatile",
api_key="",
max_tokens=8000,
temperature=0
)
@agent
def business_analyst(self) -> Agent:
return Agent(
config=self.agents_config['business_analyst'],
max_rpm=None,
verbose=True,
# llm= LLM(model="groq/llama-3.1-70b-versatile",
# api_key="",
# max_tokens=8000,
# temperature=0,
# )
)
Operating System
Windows 11
Python Version
3.11
crewAI Version
0.80.0
crewAI Tools Version
0.80.0
Virtual Environment
Venv
Evidence
ERROR: LiteLLM call failed: litellm.APIError: APIError: GroqException - Connection error.
Possible Solution
NA
Additional context
I tried through multiple ways
is anyone looking into it, I'm also facing these issues a lot, lately.
were you able to find a fix for it? @SujayC66
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.
This issue was closed because it has been stalled for 5 days with no activity.
You can give this method a try:
Add the following code in main.py:
import litellm
litellm.ssl_verify = False
from dotenv import load_dotenv
load_dotenv()
Add the following code in the .env file:
NO_PROXY=*