Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: While importing 'wsgi', an ImportError was raised: #1

Open
keirosang opened this issue Feb 20, 2024 · 2 comments
Open

Error: While importing 'wsgi', an ImportError was raised: #1

keirosang opened this issue Feb 20, 2024 · 2 comments

Comments

@keirosang
Copy link

`PS F:\ao\llama\Bottybot> .\bottybot.bat
Usage: flask run [OPTIONS]
Try 'flask run --help' for help.

Error: While importing 'wsgi', an ImportError was raised:

Traceback (most recent call last):
File "C:\Users\luoqi\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\cli.py", line 247, in locate_app
import(module_name)
File "F:\ao\llama\Bottybot\wsgi.py", line 4, in
from app import app
File "F:\ao\llama\Bottybot\app.py", line 25, in
from openai import OpenAI
ImportError: cannot import name 'OpenAI' from 'openai' (C:\Users\luoqi\AppData\Local\Programs\Python\Python311\Lib\site-packages\openai_init_.py)`

@patw
Copy link
Owner

patw commented Feb 20, 2024

Try running "pip install -r requirements.txt" again. The code was updated on Friday to allow it to run against OpenAI and Mistral.ai. If you have API keys for either of these services, check out the env.sample file to see how to configure them.

@patw
Copy link
Owner

patw commented Feb 20, 2024

I just added some code to allow one or both of the keys to be missing from the .env file, so you should be able to run without having an OpenAI or Mistral.ai account. Maybe later I'll hide the drop down entirely if it's not running in multi model mode or maybe allow multiple configured llama.cpp server mode models. I run about 5 different ones here, that would actually be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants