File "/usr/local/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/crewai/crew.py", line 192, in kickoff
return self._run_sequential_process()
File "/usr/local/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/crewai/crew.py", line 214, in _run_sequential_process
output = task.execute(context=task_output)
File "/usr/local/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/crewai/task.py", line 104, in execute
result = self._execute(
File "/usr/local/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/crewai/task.py", line 113, in _execute
result = agent.execute_task(
File "/usr/local/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/crewai/agent.py", line 160, in execute_task
result = self.agent_executor.invoke(
File "/usr/local/lib/python3.10/site-packages/langchain/chains/base.py", line 163, in invoke
raise e
File "/usr/local/lib/python3.10/site-packages/langchain/chains/base.py", line 153, in invoke
self._call(inputs, run_manager=run_manager)
File "/usr/local/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/crewai/agents/executor.py", line 62, in _call
next_step_output = self._take_next_step(
File "/usr/local/lib/python3.10/site-packages/langchain/agents/agent.py", line 1138, in _take_next_step
[
File "/usr/local/lib/python3.10/site-packages/langchain/agents/agent.py", line 1138, in
[
File "/usr/local/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/crewai/agents/executor.py", line 110, in _iter_next_step
output = self.agent.plan(
File "/usr/local/lib/python3.10/site-packages/langchain/agents/agent.py", line 397, in plan
for chunk in self.runnable.stream(inputs, config={"callbacks": callbacks}):
File "/usr/local/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 2875, in stream
yield from self.transform(iter([input]), config, kwargs)
File "/usr/local/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 2862, in transform
yield from self._transform_stream_with_config(
File "/usr/local/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 1881, in _transform_stream_with_config
chunk: Output = context.run(next, iterator) # type: ignore
File "/usr/local/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 2826, in _transform
for output in final_pipeline:
File "/usr/local/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 1282, in transform
for ichunk in input:
File "/usr/local/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 4736, in transform
yield from self.bound.transform(
File "/usr/local/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 1300, in transform
yield from self.stream(final, config, kwargs)
File "/usr/local/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py", line 249, in stream
raise e
File "/usr/local/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py", line 229, in stream
for chunk in self._stream(messages, stop=stop, kwargs):
File "/usr/local/lib/python3.10/site-packages/langchain_openai/chat_models/base.py", line 480, in _stream
with self.client.create(messages=message_dicts, params) as response:
File "/usr/local/lib/python3.10/site-packages/openai/_utils/_utils.py", line 277, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/openai/resources/chat/completions.py", line 606, in create
return self._post(
File "/usr/local/lib/python3.10/site-packages/openai/_base_client.py", line 1240, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
File "/usr/local/lib/python3.10/site-packages/openai/_base_client.py", line 921, in request
return self._request(
File "/usr/local/lib/python3.10/site-packages/openai/_base_client.py", line 1020, in _request
raise self._make_status_error_from_response(err.response) from None
openai.AuthenticationError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: sk-OGhvj***S1u2. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}
File "/usr/local/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/crewai/crew.py", line 192, in kickoff return self._run_sequential_process() File "/usr/local/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/crewai/crew.py", line 214, in _run_sequential_process output = task.execute(context=task_output) File "/usr/local/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/crewai/task.py", line 104, in execute result = self._execute( File "/usr/local/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/crewai/task.py", line 113, in _execute result = agent.execute_task( File "/usr/local/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/crewai/agent.py", line 160, in execute_task result = self.agent_executor.invoke( File "/usr/local/lib/python3.10/site-packages/langchain/chains/base.py", line 163, in invoke raise e File "/usr/local/lib/python3.10/site-packages/langchain/chains/base.py", line 153, in invoke self._call(inputs, run_manager=run_manager) File "/usr/local/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/crewai/agents/executor.py", line 62, in _call next_step_output = self._take_next_step( File "/usr/local/lib/python3.10/site-packages/langchain/agents/agent.py", line 1138, in _take_next_step [ File "/usr/local/lib/python3.10/site-packages/langchain/agents/agent.py", line 1138, in
[
File "/usr/local/Cellar/python@3.10/3.10.13/Frameworks/Python.framework/Versions/3.10/lib/python3.10/crewai/agents/executor.py", line 110, in _iter_next_step
output = self.agent.plan(
File "/usr/local/lib/python3.10/site-packages/langchain/agents/agent.py", line 397, in plan
for chunk in self.runnable.stream(inputs, config={"callbacks": callbacks}):
File "/usr/local/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 2875, in stream
yield from self.transform(iter([input]), config, kwargs)
File "/usr/local/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 2862, in transform
yield from self._transform_stream_with_config(
File "/usr/local/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 1881, in _transform_stream_with_config
chunk: Output = context.run(next, iterator) # type: ignore
File "/usr/local/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 2826, in _transform
for output in final_pipeline:
File "/usr/local/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 1282, in transform
for ichunk in input:
File "/usr/local/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 4736, in transform
yield from self.bound.transform(
File "/usr/local/lib/python3.10/site-packages/langchain_core/runnables/base.py", line 1300, in transform
yield from self.stream(final, config, kwargs)
File "/usr/local/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py", line 249, in stream
raise e
File "/usr/local/lib/python3.10/site-packages/langchain_core/language_models/chat_models.py", line 229, in stream
for chunk in self._stream(messages, stop=stop, kwargs):
File "/usr/local/lib/python3.10/site-packages/langchain_openai/chat_models/base.py", line 480, in _stream
with self.client.create(messages=message_dicts, params) as response:
File "/usr/local/lib/python3.10/site-packages/openai/_utils/_utils.py", line 277, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/openai/resources/chat/completions.py", line 606, in create
return self._post(
File "/usr/local/lib/python3.10/site-packages/openai/_base_client.py", line 1240, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
File "/usr/local/lib/python3.10/site-packages/openai/_base_client.py", line 921, in request
return self._request(
File "/usr/local/lib/python3.10/site-packages/openai/_base_client.py", line 1020, in _request
raise self._make_status_error_from_response(err.response) from None
openai.AuthenticationError: Error code: 401 - {'error': {'message': 'Incorrect API key provided: sk-OGhvj***S1u2. You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}
通过点击(申请内测免费KEY)生成的keys,添加到项目目录下的.env文件里,但是报提供的API密钥不正确!!!