Skip to main content

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.

Metadata

Release files for streamlit-ai-assist 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for streamlit-ai-assist 0.1.1
File Size Uploaded
streamlit_ai_assist-0.1.1.tar.gz 1.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-ai-assist 0.1.1
File Interpreter ABI Platform
streamlit_ai_assist-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 3.2 MB

Release files / streamlit_ai_assist-0.1.1.tar.gz

Download URL streamlit_ai_assist-0.1.1.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
df1890ebd6c9818c1c7bdb5da81cdbe11be1a2dd215fd37f5c1e1a8d091874cb
BLAKE2b-256 checksum
How to use checksums
3f431146bee5aefef99cf3c9f022a4c20d488fdb552136b8833b4939a3a3ebad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.1

Release files / streamlit_ai_assist-0.1.1-py3-none-any.whl

Download URL streamlit_ai_assist-0.1.1-py3-none-any.whl
Size 1.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d966a22cbaa6ed0559e5cb2c092bda5baa40e892be344f99253b92e092dfd49c
BLAKE2b-256 checksum
How to use checksums
9bc3915f52c34e51c589df493f4a2599af030de9211f290e9cde0d4ffd477f25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page