When I kick off a crew, it gets stuck in a loop. Is there any parameter I can use to avoid the loop?
If the problem is my OpenAI API Key then this should definitely stop after some retries, but my crew does not.
llm = LLM(
model='gpt-4o-mini',
api_key=OPENAI_API_KEY
)
Agent setting:
- allow_delegation=True,
- verbose=True,
- max_iter=3,
Stuck in Loop
-
ERROR:root:LiteLLM call failed: litellm.AuthenticationError: AuthenticationError: OpenAIException - Error code: 401 - {‘error’: {‘message’: ‘Incorrect API key provided: sk-proj-*********************************************. You can find your API key at https://platform.openai.com/account/api-keys.’, ‘type’: ‘invalid_request_error’, ‘param’: None, ‘code’: ‘invalid_api_key’}}
-
LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True’.
.
.
.