Closed SAI-sentinal-ai closed 1 year ago
I'll have a look
Can you provide the code you used and got this error?
from qnabot.QnABot import QnABot
import os, sys
os.environ["OPENAI_API_KEY"] = "sk-xyz"
bot = QnABot(directory="./files")
bot.print_answer("what was the first roster of angers in comics?")
bot.print_answer("Who is Vision?")
saved as example.py
Its possible that you are using an older python. Can you try using python 3.10?
That was it. Also, strangely I had to modify the __init__.py
in the site-packages/qnabot
directory, from from QnABot import QnABot
to from .QnABot import QnABot
, i.e., add the period ".". Thanks for the effort! Does the input data need to be in a single text file? what happens when it exceeds, say, 8k tokens?
Good catch. I'll change the docs thing as well. It's still early dev and i've only spent 2 afternoons on it, sorry 😅
Thats a good question. the docs are divided when the FAISS index is created. You can see this here.
Im closing this issuea as this is fixed. Ill also add in the notes the supported python versions so that people don't have this problem. I'll also open the discussions at some point for questions.
Ping me if you need something else. Thank you 🤝
Hi, upon import:
I receive the error:
I am on an M1 Mac if that makes a difference.