Using Google Colab:
I added code "%env OPENAI_API_KEY=“openai_API_Key fromOpenAI”
inputs = {
“lead_name”: “DeepLearningAI”,
“industry”: “Online Learning Platform”,
“key_decision_maker”: “Andrew Ng”,
“position”: “CEO”,
“milestone”: “product launch”
}
result = crew.kickoff(inputs=inputs)
Ran it and got:
AuthenticationError Traceback (most recent call last)
in <cell line: 0>()
7 }
8
----> 9 result = crew.kickoff(inputs=inputs)
18 frames
/usr/local/lib/python3.11/dist-packages/openai/_base_client.py in _request(self, cast_to, options, retries_taken, stream, stream_cls)
1062
1063 log.debug(“Re-raising status error”)
→ 1064 raise self._make_status_error_from_response(err.response) from None
1065
1066 return self._process_response(
AuthenticationError: Error code: 401 - {‘error’: {‘message’: ‘Incorrect API key provided: “097c927******************************************************712”. You can find your API key at https://platform.openai.com/account/api-keys.’, ‘type’: ‘invalid_request_error’, ‘param’: None, ‘code’: ‘invalid_api_key’}}
I was able to use same OPEN_AI_KEY for
sales_rep_agent = Agent(
role=“Sales Representative”,
goal="Identify high-value leads that match "
“our ideal customer profile”,
backstory=(
"As a part of the dynamic sales team at CrewAI, "
"your mission is to scour "
"the digital landscape for potential leads. "
"Armed with cutting-edge tools "
"and a strategic mindset, you analyze data, "
"trends, and interactions to "
"unearth opportunities that others might overlook. "
"Your work is crucial in paving the way "
“for meaningful engagements and driving the company’s growth.”
),
allow_delegation=False,
verbose=True
)
without any problem.
Anythong I. did wrong?
Thanks.
Peter