Mindinventory / MindSQL

MindSQL: A Python Text-to-SQL RAG Library simplifying database interactions. Seamlessly integrates with PostgreSQL, MySQL, SQLite, Snowflake, and BigQuery. Powered by GPT-4 and Llama 2, it enables natural language queries. Supports ChromaDB and Faiss for context-aware responses.
https://www.mindinventory.com/text-to-sql-mindsql.php?utm_source=sampromotiion&utm_medium=Button&utm_campaign=sampromotion&utm_id=sampromotion&utm_term=sampromotiion&utm_content=sampromotiion
GNU General Public License v3.0
232 stars 19 forks source link

How do I use LLMs from HuggingFace. #10

Closed LSRAO closed 4 months ago

LSRAO commented 4 months ago

Well there is a class for HuggingFace models. However, when I import HuggingFace class it does not import.

from mindsql.llms import GoogleGenAi, HuggingFace

Error:

Traceback (most recent call last):
  File "/media/ksquarez/MLAI/nl2sql/MindSQL/poc/trial.py", line 5, in <module>
    from mindsql.llms import GoogleGenAi, HuggingFace
ImportError: cannot import name 'HuggingFace' from 'mindsql.llms' (/media/ksquarez/MLAI/nl2sql/MindSQL/.venv/lib/python3.10/site-packages/mindsql/llms/__init__.py)

Am I importing it incorrectly? How do I use it?

LSRAO commented 4 months ago

Resolved by building mindsql from source.