Skip to content

Releases: premAI-io/premsql

PremSQL Agents, Agent Server and Playground UI

13 Nov 19:38
850ddde
Compare
Choose a tag to compare

New: PremSQL Playground, Agents and API

We just rleased the latest version of PremSQL. It comes with the following:

  • PremSQL Agents: Using PremSQL agents you can make analysis, plot charts and query to databases all using Natural Language. For now it comes with a baseline level agent. Using our library you can customize agents and build on top of it.
  • PremSQL API: A self hosted API which can then be used using any language to make requests to use the deployed agents.
  • PremSQL Playground: A playground UI (self hosted) which you can use interact with Text to SQL agents for your analysis tasks. You can also test your customized agents using this playground as well. Watch it in action.
  • Ollama support: We are also supporting Ollama. Here is the Ollama version of Prem-1B-SQL
# install new premsql version using PyPI
pip install -U premsql
2024-11-11.15-33-25.mov

What's Changed

Full Changelog: v0.1-alpha...0.2.1

PremSQL v0.1 | End-to-End Local-First Text-to-SQL Pipelines

10 Sep 09:20
065454a
Compare
Choose a tag to compare

We are excited to release the very first stable release of PremSQL. You can install PremSQL using PyPI

Check out our documentation to checkout details.

image

pip install -U premsql

PremSQL is an open-source library designed to help developers create secure, fully local Text-to-SQL solutions using small language models. It provides all the essential tools to build and deploy end-to-end Text-to-SQL pipelines with customizable components, making it ideal for secure, autonomous AI-powered data analysis.

Quick Start

from premsql.pipelines import SimpleText2SQLAgent
from premsql.generators import Text2SQLGeneratorHF
from premsql.executors import SQLiteExecutor

# Provide a SQLite file here or see documentation for more customization
dsn_or_db_path = "./data/db/california_schools.sqlite"

agent = SimpleText2SQLAgent(
    dsn_or_db_path=dsn_or_db_path,
    generator=Text2SQLGeneratorHF(
        model_or_name_or_path="premai-io/prem-1B-SQL",
        experiment_name="simple_pipeline",
        device="cuda:0",
        type="test"
    ),
)

question = "please list the phone numbers of the direct charter-funded schools that are opened after 2000/1/1"

response = agent.query(question)
response["table"]

Check out our documentation to checkout details.