Skip to main content

A built in data analyst for your Streamlit app

Project description

streamlit-ai-assist

streamlit-ai-assist uses the power of Snowflake Arctic, an open_source LLM, to personalize dashboards and allow all audiences to easily explore new and pre-built data visualizations. It's a built-in data analyst for your Streamlit dashboard.

If you add this component to your dashboard, dashboard viewers will be able to chat with an LLM assistant to get answers to their questions. If there are relevant graphs already in the dashboard, then the assistant will display those. If the question requires a new graph, the LLM is able to write the code to create that. These new graphs are highlighted in yellow, and if GitHub connection is configured in the app, then the user will be allowed to easily create a PR that integrates the code into the dashboard once reviewed and approved by a team member.

If a user has a particular question, the AI assistant can execute SQL SELECT statements that let it access the raw numbers. It can summarize graphs for you and return answers to a quick question you have.

The bottom view of the streamlit component is a preview of the most relevant graphs availabe in the dashboard. If you haven't formulated a question yet, a simple keyword search or "show me graphs about X" could be helpful!

Installation instructions

pip install streamlit-custom-component

Usage instructions

import streamlit as st

from streamlit_ai_assist import streamlit_ai_assit

streamlit_ai_assist(
            graphing_file_path="graphing.py",
            graphing_import_path="graphing",
            database_name="snowflake",
            general_description="This is a database for a company that does X",
            mode="chat",
            key="foo1"
)

Requirements

The following credentials are needed:

Environment Variables (can be specified in secrets.toml or with os)

REPLICATE_API_TOKEN

Database Connection Variables (must be specified in secrets.toml in a section named connections.<database_name>)

e.g.

[connections.snowflake]
type = "snowflake"
user = 
password =
account = 
role = 
warehouse = 
database = 
schema = 
client_session_keep_alive = true

Currently, only Snowflake database connections are tested and fully supported.

Optional Environment Variables

GITHUB_PERSONAL_ACCESS_TOKEN
REPO_NAME
REPO_OWNER

If these are specified, GitHub PR automation will be enabled.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit-ai-assist-0.0.1.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_ai_assist-0.0.1-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file streamlit-ai-assist-0.0.1.tar.gz.

File metadata

  • Download URL: streamlit-ai-assist-0.0.1.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.1

File hashes

Hashes for streamlit-ai-assist-0.0.1.tar.gz
Algorithm Hash digest
SHA256 19cdbfe271ef4dde99b91a46d02029242f804fcd86b1e4dc1d89d49ed5965c2c
MD5 6aa0888c261a678984c373e42eb268e1
BLAKE2b-256 435c4e45d34a909ebf5a496f4a70ae2019218e30bb1e0d35f421803b38e238db

See more details on using hashes here.

File details

Details for the file streamlit_ai_assist-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_ai_assist-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6f428fb054219f5c51696c1e6a2b94e6c0954a4b6ef0b0d1086f97a78adc9897
MD5 b57fab9f0f10f3b08b6b86947efd664f
BLAKE2b-256 dc92d497eeaaf8ac199e9475fd02849808805daa8e5115f8f80bbdb3b80beec3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page