MetaGPT icon indicating copy to clipboard operation
MetaGPT copied to clipboard

spark config get a error raise NotConfiguredException("Set OPENAI_API_KEY or Anthropic_API_KEY or ZHIPUAI_API_KEY first")

Open xjspace opened this issue 1 year ago • 4 comments
trafficstars

#### if Spark
SPARK_API_KEY: ""
SPARK_API_SECRET:""
SPARK_APPID: ""
DOMAIN: "generalv3"
SPARK_URL: ""

config Spark Configure blocks

I'm Get a error raise NotConfiguredException("Set OPENAI_API_KEY or Anthropic_API_KEY or ZHIPUAI_API_KEY first")

xjspace avatar Dec 10 '23 04:12 xjspace

i get this error also ,now, have answer?

liulinlin avatar Dec 10 '23 04:12 liulinlin

which version?

stellaHSR avatar Dec 20 '23 09:12 stellaHSR

which version?

metaGPT 最新版(metaGpt) 0.5

root@140204:/data/MetaGPT# metagpt "写个输入描述项目的输入框ui 执行metagpt 参数是描述项目的输入"”
2023-12-21 11:06:48.655 | INFO     | metagpt.const:get_metagpt_package_root:32 - Package root set to /data/MetaGPT
Traceback (most recent call last):
  File "/home/miniconda3/envs/metaGpt/bin/metagpt", line 33, in <module>
    sys.exit(load_entry_point('metagpt', 'console_scripts', 'metagpt')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/miniconda3/envs/metaGpt/bin/metagpt", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/miniconda3/envs/metaGpt/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/miniconda3/envs/metaGpt/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/data/MetaGPT/metagpt/startup.py", line 8, in <module>
    from metagpt.config import CONFIG
  File "/data/MetaGPT/metagpt/config.py", line 184, in <module>
    CONFIG = Config()
             ^^^^^^^^
  File "/data/MetaGPT/metagpt/utils/singleton.py", line 21, in __call__
    cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/MetaGPT/metagpt/config.py", line 51, in __init__
    self._update()
  File "/data/MetaGPT/metagpt/config.py", line 70, in _update
    raise NotConfiguredException(
metagpt.config.NotConfiguredException: Set OPENAI_API_KEY or Anthropic_API_KEY or ZHIPUAI_API_KEY first or FIREWORKS_API_KEY or OPEN_LLM_API_BASE

xjspace avatar Dec 21 '23 03:12 xjspace

image

Spark(星火)还没有进入provider

geekan avatar Dec 21 '23 08:12 geekan