Skip to content

bhanudev-org/yipao

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Yipao Logo

| GitHub | PyPI | Documentation |

Yipao is a cutting-edge Python library that enables AI-driven interactions with SQL databases. It specializes in facilitating dynamic SQL query generation and execution, particularly for large databases with numerous tables. Integrated with ChromaDB, Google Generative AI, Vertex AI, and Qdrant, Yipao is a powerful tool for developers looking to leverage machine learning models and vector storage solutions.

Why Yipao? ๐Ÿค”

Yipao is designed to simplify complex SQL query operations and enhance the interaction between large-scale database systems and AI technologies. It allows developers to:

  • Generate and execute SQL queries dynamically using natural language.
  • Integrate seamlessly with leading AI platforms and vector databases.
  • Improve database querying efficiency and accuracy through AI-driven insights.

Installation ๐Ÿ› ๏ธ

To install Yipao, you can use pip:

pip install yipao

Quick Start ๐Ÿš€

Here's a quick example to get you started with Yipao:

import os
from dotenv import load_dotenv
load_dotenv()

import yipao as yp
from yipao.databases import MySql
from yipao.vectorstores import QdrantDB
from yipao.LLM import GoogleGenAi

connection = {
    'host': os.getenv('HOST'),
    'user': os.getenv('USERDB'),
    'password': os.getenv('PASSWORD'),
    'database': os.getenv('DATABASE'),
    'port': int(os.getenv('PORT'))
}

mysql = MySql(**connection)

qdrant =  QdrantDB(':memory:')

gemini = GoogleGenAi(model='gemini-pro', api_key=os.getenv('APIKEYGEMINI'))

agent = yp.Agent(llm=gemini, 
                 database=mysql, 
                 vectorstore=qdrant)

agent.document_database()

prompt = f"What is my best selling product?"

res = agent.invoke(prompt)

print(res)
# your best products are...

ROADMAP

  • implement groq interface
  • implement openai interface
  • customdatabase interface
  • sqlite integration, other sql dialects
  • create tests
  • add sql database as example
  • RAG-graph based for better accuracy
    • neo4j integration
    • embedding store in graphs

Contributing ๐Ÿ‘‹

Want to help improve Yipao? Contributions are welcome! ๐ŸŽ‰

About

๐Ÿค– Chat with your large SQL database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages