blip-solutions / promptwatch-client

Python client for PromptWatch.io - LLM tracking platform
https://www.promptwatch.io
28 stars 2 forks source link

ModuleNotFoundError: No module named 'promptwatch.unit_tests' #8

Closed bmanturner closed 1 year ago

bmanturner commented 1 year ago
from promptwatch.unit_tests import UnitTest

results in

Traceback (most recent call last):
  File "/Users/bfturner/dev/heavynl/promptwatch.py", line 1, in <module>
    from promptwatch.unit_tests import UnitTest
  File "/Users/bfturner/dev/heavynl/promptwatch.py", line 1, in <module>
    from promptwatch.unit_tests import UnitTest
ModuleNotFoundError: No module named 'promptwatch.unit_tests'; 'promptwatch' is not a package
bmanturner commented 1 year ago

Also, if you're gonna dig around in there, could you add an api_key arg to UnitTest that gets passed to Client if it makes sense to do so?

bmanturner commented 1 year ago

My mistake. I named my scratch file promptwatch.py

ju-bezdek commented 1 year ago

The problem is that you named your file promptwatch.py

common python pitfall

As for the api_key param, yeah... makes total sense

you can set it up as an env variable PROMPTWATCH_API_KEY