Giter VIP home page Giter VIP logo

Comments (9)

zehuiya avatar zehuiya commented on May 18, 2024

The error occurred due to the absence of configuration for the OPENAI_API_KEY in your code program.

from metagpt.

dolev765 avatar dolev765 commented on May 18, 2024

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.

dolev765 avatar dolev765 commented on May 18, 2024

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.

geekan avatar geekan commented on May 18, 2024

Could you provide the full paths of the config files?

And maybe you could try to set up the vars in env.

from metagpt.

dolev765 avatar dolev765 commented on May 18, 2024

@geekan kk just a sec

from metagpt.

dolev765 avatar dolev765 commented on May 18, 2024

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.

MARYAMJAHANIR avatar MARYAMJAHANIR commented on May 18, 2024

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.

Hoanganhvu123 avatar Hoanganhvu123 commented on May 18, 2024

same, so how can i fix it

from metagpt.

monjoes avatar monjoes commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.