Skip to main content

streamlit-ai-chatbot

Adds the Asyntai AI chat assistant to a Streamlit app. The assistant answers visitor questions from your own content, day and night, in more than 80 languages.

Free and open source. Works on every Asyntai plan, including the free plan.

Install

pip install streamlit-ai-chatbot

Use

Call chatbot() once near the top of your app:

import streamlit as st
from streamlit_ai_chatbot import chatbot

chatbot("asyntai_ab12cd34")

st.title("My app")

You get the ID from the Install page of your Asyntai dashboard. You can paste the whole snippet; the package keeps only the ID.

The chat button appears in the corner of the page. It stays open when the app reruns, and it loads only once per browser tab.

Keep the ID out of your code

Leave out the ID, and the package reads ASYNTAI_WIDGET_ID from st.secrets or from the environment:

# .streamlit/secrets.toml
ASYNTAI_WIDGET_ID = "asyntai_ab12cd34"
chatbot()

This also works on Streamlit Community Cloud: add the line in the app's Secrets settings.

Multipage apps

With st.navigation, call chatbot() in the main file, before pg.run(). With a pages/ folder, call it at the top of each page.

Options

chatbot(
    "asyntai_ab12cd34",
    script_url="https://widget.asyntai.com/static/js/chat-widget.js",  # optional
)

chatbot() returns True when the chat is on the page. With an ID that is not valid it shows nothing, returns False and logs a warning.

How it works

On Streamlit 1.52 and newer, the package uses st.html to add the widget script to the page. On older versions it uses a hidden component. Either way, the empty block is hidden, so your layout does not change.

What the assistant does

  • Answers visitor questions from your website, documents and FAQ
  • Collects leads and hands the chat to a person when needed
  • Works in more than 80 languages

Set it up and train it in your Asyntai dashboard.

License

MIT

Metadata

Release files for streamlit-ai-chatbot 1.0.0

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-chatbot 1.0.0
File Size Uploaded Provenance Actions
streamlit_ai_chatbot-1.0.0.tar.gz 8.6 kB Without provenance Details for streamlit_ai_chatbot-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-ai-chatbot 1.0.0
File Interpreter ABI Platform Actions
streamlit_ai_chatbot-1.0.0-py3-none-any.whl Python 3 none any Details for streamlit_ai_chatbot-1.0.0-py3-none-any.whl

Total release size: 15.5 kB

Release files / streamlit_ai_chatbot-1.0.0.tar.gz

Download URL streamlit_ai_chatbot-1.0.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
98e9484f37dfa4fb32d0669616ca6013c54a2b0275f5824ed059a2e47dea28fe
BLAKE2b-256 checksum
How to use checksums
085153ba7a2e7c31b25d29de6f7fb5f74016292e62d96e72c548ce4fbd5dd0bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / streamlit_ai_chatbot-1.0.0-py3-none-any.whl

Download URL streamlit_ai_chatbot-1.0.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4eedd2d967560cb25932445aafb5902681f75d412eb88429ced96b063121c34f
BLAKE2b-256 checksum
How to use checksums
0a8b60ec0c2080832aa2258c57c820d1fe123861ce1ae39f2f045c18148530cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for streamlit-ai-chatbot 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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