Comments (9)
The error occurred due to the absence of configuration for the OPENAI_API_KEY in your code program.
from metagpt.
The error occurred due to the absence of configuration for the OPENAI_API_KEY in your code program.
Which code should i fill out which I haven't. i filled (config.py, key.yaml, config.yaml), and does it work on powershell?
from metagpt.
self.openai_api_key = self._get('catto_key_censored')
if not self.openai_api_key or 'YOUR_API_KEY' == self.openai_api_key:
raise NotConfiguredException("Set OPENAI_API_KEY first")
self.openai_api_base = self._get('https://api.cattto.repl.co/v1')
if not self.openai_api_base or 'YOUR_API_BASE' == self.openai_api_base:
logger.info("Set OPENAI_API_BASE in case of network issues")
any thing I missed here?
from metagpt.
Could you provide the full paths of the config files?
And maybe you could try to set up the vars in env.
from metagpt.
@geekan kk just a sec
from metagpt.
Hey sorry for the annoyance before I asked my roomate for help he got stuck and just wrote a request but he forgot to setup a venv so I came setup the venv and the rest of the stuff now I get this error : (metagpt) PS C:\Users\dolev\metagpt> python startup.py "Write a cli snake game"
Traceback (most recent call last):
File "C:\Users\dolev\metagpt\startup.py", line 5, in
from metagpt.software_company import SoftwareCompany
File "C:\Users\dolev\metagpt\metagpt\software_company.py", line 10, in
from metagpt.config import CONFIG
File "C:\Users\dolev\metagpt\metagpt\config.py", line 13, in
from metagpt.utils.singleton import Singleton
File "C:\Users\dolev\metagpt\metagpt\utils_init_.py", line 10, in
from metagpt.utils.read_document import read_docx
File "C:\Users\dolev\metagpt\metagpt\utils\read_document.py", line 9, in
import docx
File "C:\Users\dolev\metagpt\lib\site-packages\docx.py", line 30, in
from exceptions import PendingDeprecationWarning
ModuleNotFoundError: No module named 'exceptions'
from metagpt.
hey @dolev765 @geekan can you pls help me, actually i am unable to resolve this error and i don't know exactly where i made the mistake the error is:
(metagpt) (base) maryam_linux@Maryam:/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main$ cd metagpt
(metagpt) (base) maryam_linux@Maryam:/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt$ python startup.py
2023-12-22 05:23:23.390 | INFO | metagpt.const:get_metagpt_package_root:32 - Package root set to /mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt
Traceback (most recent call last):
File "/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt/startup.py", line 8, in
from metagpt.config import CONFIG
File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 230, in
CONFIG = Config()
^^^^^^^^
File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/utils/singleton.py", line 21, in call
cls._instances[cls] = super(Singleton, cls).call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 70, in init
self._update()
File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 106, in _update
_ = self.get_default_llm_provider_enum()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 90, in get_default_llm_provider_enum
raise NotConfiguredException("You should config a LLM configuration first")
metagpt.config.NotConfiguredException: You should config a LLM configuration first
(metagpt) (base) maryam_linux@Maryam:/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt$
from metagpt.
same, so how can i fix it
from metagpt.
hey @dolev765 @geekan can you pls help me, actually i am unable to resolve this error and i don't know exactly where i made the mistake the error is: (metagpt) (base) maryam_linux@Maryam:/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main$ cd metagpt (metagpt) (base) maryam_linux@Maryam:/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt$ python startup.py 2023-12-22 05:23:23.390 | INFO | metagpt.const:get_metagpt_package_root:32 - Package root set to /mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt Traceback (most recent call last): File "/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt/startup.py", line 8, in from metagpt.config import CONFIG File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 230, in CONFIG = Config() ^^^^^^^^ File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/utils/singleton.py", line 21, in call cls._instances[cls] = super(Singleton, cls).call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 70, in init self._update() File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 106, in _update _ = self.get_default_llm_provider_enum() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/maryam_linux/miniconda3/envs/metagpt/lib/python3.11/site-packages/metagpt-0.5.2-py3.11.egg/metagpt/config.py", line 90, in get_default_llm_provider_enum raise NotConfiguredException("You should config a LLM configuration first") metagpt.config.NotConfiguredException: You should config a LLM configuration first (metagpt) (base) maryam_linux@Maryam:/mnt/c/Users/Hp/autogen_wsl/MetaGPT-main/metagpt$
I have the same issue , were you able to fix it?
from metagpt.
Related Issues (20)
- Warnings and errors while trying to execute metagpt utility with local LLM HOT 4
- New improvements (PB)
- Running the same prompt will repeatedly overwrite project files in the workspace
- Error after supplementing prompt requirements
- The instructions and usage of --help need to be added to the official documentation.
- Generate garbled code starting with u, incorrect JSON format, duplicate request HOT 5
- Issues related with write_code_review and Total running cost HOT 3
- AttributeError: module 'setuptools.errors' has no attribute 'CompileError' HOT 1
- [IPKernelApp] WARNING | Parent appears to have exited, shutting down
- how to run werewolf in the current environment HOT 1
- 忽略用户需求,转而产出game.py HOT 1
- pydantic_core._pydantic_core.ValidationError: 1 validation error for Config HOT 3
- There is a bug of zhipuai llm while using metagpt on ubuntu22.04 under the environment of WSL2 of windows11 Home edition HOT 5
- 如何实现使LLM输出符合格式要求的SOP或Json? HOT 1
- GLM4一直报错 HOT 3
- 百度千帆API调用失败 HOT 2
- ModuleNotFoundError: No module named 'pwd' HOT 2
- setted "repair_llm_output: true" in config2.yaml, but still meet the JSONDecodeError HOT 2
- Multi modal LLM integration HOT 1
- A direct dependency ipykernel==6.27.0 is a yanked version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metagpt.