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

Qdrant not working #383

Open
icfai-aniketsingh opened this issue Apr 23, 2024 · 3 comments · Fixed by #399
Open

Qdrant not working #383

icfai-aniketsingh opened this issue Apr 23, 2024 · 3 comments · Fixed by #399
Labels
bug Something isn't working

Comments

@icfai-aniketsingh
Copy link

Describe the bug
With the use of qdrant vector database we are getting the attributes error as below"

To Reproduce
Steps to reproduce the behavior:
Pasting jupyter code :

from vanna.ollama import Ollama
from vanna.qdrant import Qdrant_VectorStore
from qdrant_client import QdrantClient

class MyVanna(Qdrant_VectorStore, Ollama):
    def __init__(self, config=None):
        Qdrant_VectorStore.__init__(self, config=config)
        Ollama.__init__(self, config={'model': 'mistral'})

vn = MyVanna(config={'client': QdrantClient(url="http://localhost:6333/")})

vn.connect_to_mysql(host='192.168.96.1', dbname='rag', user='wsl_root', password='password', port=3306)

# The information schema query may need some tweaking depending on your database. This is a good starting point.
df_information_schema = vn.run_sql("SELECT * FROM INFORMATION_SCHEMA.COLUMNS")

# This will break up the information schema into bite-sized chunks that can be referenced by the LLM
plan = vn.get_training_plan_generic(df_information_schema)
plan

# If you like the plan, then uncomment this and run it to train
vn.train(plan=plan)

from vanna.flask import VannaFlaskApp
app = VannaFlaskApp(vn)
app.allow_llm_to_see_data = True
app.run()

Expected behavior
Training data should show all the trained data

Error logs/Screenshots
AttributeError
AttributeError: 'MyVanna' object has no attribute 'documentation_collection'

Desktop (please complete the following information where):

  • OS: Ubuntu
  • Version: 22.04]
  • Python: 3.10.12
  • Vanna: 0.4.2
@icfai-aniketsingh icfai-aniketsingh added the bug Something isn't working label Apr 23, 2024
@icfai-aniketsingh
Copy link
Author

icfai-aniketsingh commented Apr 23, 2024

Was going through the code and found below points:

  1. Method is not defined in the qdrant.py with documentation_collection
  2. Import is not correct, examples is having from vanna.qdrant import Qdrant but code is working with from vanna.qdrant import Qdrant_VectorStore as method defined with the same.

@zainhoda
Copy link
Contributor

Thanks for reporting!

@Anush008
Copy link
Contributor

Anush008 commented May 2, 2024

I see the docs have been updated with the proper imports.
@icfai-aniketsingh, could you please confirm if they work for you now?

@zainhoda zainhoda linked a pull request May 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants