SuperAPI AI Directory

MindSQL

A python package for Txt-to-SQL with self hosting functionalities and RESTful APIs compatible with proprietary as well as open source LLM.

Open website

About this tool

MindSQL is a Python RAG (Retrieval-Augmented Generation) library designed to simplify database interaction, allowing users to query databases in natural language with just a few lines of code.

Purpose: To translate natural language questions into SQL, thereby lowering the barrier to interacting with databases.

Main capabilities:

  • Seamless integration with databases such as PostgreSQL, MySQL, and SQLite; by extending the IDatabase interface, it can also support major databases such as Snowflake and BigQuery.
  • Use large language models such as GPT-4, Llama 2, and Google Gemini.
  • Support knowledge bases such as ChromaDB and Faiss to provide context-aware responses.

Usage: MindSQL can be installed via pip; the library requires Python 3.10 or higher.

Code structure:

  • _utils: Utility module containing constants and loggers.
  • _helper: Helper module.
  • core: Main core module, minds_core.py.
  • databases: Database-related module.
  • llms: Language model-related module.
  • testing: Test scripts.
  • vectorstores: Vector store-related module.
  • poetry.lock and pyproject.toml: Poetry dependency and configuration files.
  • tests: Test cases.

Use cases: Scenarios that require querying the above supported databases in natural language.

Limitations: Currently only PostgreSQL, MySQL, SQLite, Snowflake, and BigQuery are explicitly supported; other databases need to be implemented by extending the IDatabase interface. Other details regarding billing, pricing, and more features are not provided at this time.