snowby666 / poe-api-wrapper

👾 A Python API wrapper for Poe.com. With this, you will have free access to GPT-4, Claude, Llama, Gemini, Mistral and more! 🚀
https://pypi.org/project/poe-api-wrapper/
GNU General Public License v3.0
920 stars 108 forks source link

kick up the python api . it push a error message #178

Open elohffa opened 3 months ago

elohffa commented 3 months ago

Hi , I got a problem when kick up the api and I got this message , can u help take a look

python api.py Traceback (most recent call last): File "/home/xxx/Documents/Repolocal/poe-api-wrapper/poe_api_wrapper/openai/api.py", line 7, in from poe_api_wrapper.openai import helpers ModuleNotFoundError: No module named 'poe_api_wrapper.openai'

KA4I commented 3 months ago

Hi I had the same problem, but I managed to fix it go in /poe-api-wrapper/poe_api_wrapper/openai/api.py file and line 7 and 8 should become from this:

from poe_api_wrapper.openai import helpers from poe_api_wrapper.openai.type import *

To this: import helpers from type import *

Basically you need to remove poe_api_wrapper.openai as you are already in that directory and when you run python api.py it tries to look for these modules in "/Repolocal/poe-api-wrapper/poe_api_wrapper/openai/poe_api_wrapper/openai" when in fact they are in "/Repolocal/poe-api-wrapper/poe_api_wrapper/openai/".

Hope it helps.