Despliega 1000+ apps y plantillas en un clic
Recetas listas para Wasmer.
Recetas listas para Wasmer.
A Streamlit chat app that streams OpenAI answers through LangChain; each visitor brings their own API key.

A Streamlit chat app that streams answers from OpenAI through LangChain, running on Wasmer Edge.
After catalog registration, deploy this template from the Wasmer templates page.
streamlit_app.py is the whole app: a sidebar for the key and model, the chat history and a streaming reply..streamlit/config.toml sets the theme and binds to IPv4 for the Wasmer runtime.streamlit run streamlit_app.py.By default each visitor pastes their own OpenAI API key in the sidebar. The sidebar sends the key to the app server and keeps it only in that visitor's server-side session memory; use a deployment you trust. This app does not log the key or write it to disk.
To let visitors chat without a key, set both secrets on your app:
OPENAI_API_KEY: the key to share.ALLOW_SHARED_OPENAI_KEY=true: opts in to sharing it. Without this, the app ignores OPENAI_API_KEY.Warning: with
ALLOW_SHARED_OPENAI_KEY=true, anyone who can open your app can spend your OpenAI key. Only enable it on private deployments, and set usage limits on the key in your OpenAI account. A key typed in the sidebar always takes priority.
uv sync
uv run streamlit run streamlit_app.py
Then open http://localhost:8501/.
Catalog registration follows source merge; this PR does not publish the catalog entry. Dependencies are locked in uv.lock; run uv lock after changing pyproject.toml.
This app uses Streamlit’s supported sidebar, text input, select box, buttons, alerts and chat widgets. The supported theme configuration uses Wasmer’s canonical neutral colors; no page-local CSS replaces framework components.
Run uv run python -m unittest discover -s tests. Tests use synthetic keys and a fake model; no paid model requests are sent.