Giter Site home page Giter Site logo

Import error about megabots HOT 6 CLOSED

SAI-sentinal-ai avatar SAI-sentinal-ai commented on May 27, 2024
Import error

from megabots.

Comments (6)

momegas avatar momegas commented on May 27, 2024 1

Its possible that you are using an older python. Can you try using python 3.10?

from megabots.

momegas avatar momegas commented on May 27, 2024

I'll have a look

from megabots.

momegas avatar momegas commented on May 27, 2024

Can you provide the code you used and got this error?

from megabots.

SAI-sentinal-ai avatar SAI-sentinal-ai commented on May 27, 2024
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

from megabots.

SAI-sentinal-ai avatar SAI-sentinal-ai commented on May 27, 2024

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?

from megabots.

momegas avatar momegas commented on May 27, 2024

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 🤝

from megabots.

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.