experimental-chat-popup
Use and maintain vizro-experimental chat model and floating popup, preserving optional LLM dependencies and security boundaries.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- experimental-chat-popup
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use and maintain vizro-experimental chat model and floating popup, preserving optional LLM dependencies and security boundaries.
- disable-model-invocation
- true
03 SKILL.md 正文
Experimental Chat Popup
Use this sub-skill when the task involves vizro-experimental, the Chat model, floating chat popup, dashboard-agent helper, chat security, or experimental chat examples/docs.
Route elsewhere when the task is mainly about:
- Stable Vizro core dashboard layout/components:
../core-dashboard-build/SKILL.mdand../core-components-data-actions/SKILL.md. - Vizro-MCP agent workflows:
../mcp-agent-workflows/SKILL.md.
Experimental caveat
vizro-experimental is an incubation package. APIs may change, be removed, or graduate into vizro-core. Say this when giving user-facing guidance.
Chat model
from vizro_experimental.chat.models.chat import Chat
chat = Chat(
id="assistant",
placeholder="Ask a question about this dashboard",
file_upload=False,
example_questions=["What changed this month?"],
)
Live signature in the verified snapshot:
Chat(*, id=<factory>, type='chat', actions=[], placeholder='How can I help you?', file_upload=False, example_questions=[])
Floating popup
The popup package uses lazy exports:
from vizro_experimental.chat.popup import add_chat_popup
add_chat_popup(
generate_response=lambda messages, **kwargs: "Local deterministic response",
title="Analytics Assistant",
streaming=False,
)
Available lazy exports:
add_chat_popupcreate_dashboard_agentmake_generate_response
There is no Popup class exported from vizro_experimental.chat.popup in this snapshot.
Optional dependency boundary
Preserve the BYO callback boundary:
- Users who pass
generate_responseshould not need dashboard-agent provider dependencies. - Do not promote dashboard-agent/pydantic-ai imports to module scope if that would break BYO mode.
- Only load
create_dashboard_agent/make_generate_responsewhen the user explicitly requests agent-backed behavior.
Security defaults
- Treat chat input and uploaded file content as untrusted.
- Do not leak API keys or environment variables into chat responses or logs.
- Avoid executing user-provided code from chat messages.
- Prefer deterministic/mocked
generate_responsein tests. - Require explicit provider credentials and network/cost authorization before live LLM calls.
Repository tests
From vizro-experimental/:
hatch run test-unit tests/unit/test_component.py tests/unit/test_security.py tests/unit/popup/test_popup.py
Browser integration tests under tests/integration/browser/ require a browser backend; do not make them required on a host without Chrome/Chromium.
Debug checklist
- Is the task using stable core features or truly experimental chat APIs?
- Is the user using
Chatas a model component or adding the floating popup to an already built Vizro app? - Is
generate_responseprovided? If yes, keep provider dependencies out of the path. - If using dashboard-agent helpers, are credentials/model/provider settings available and authorized?
- Are tests using mocked local responses rather than live LLM calls?
Evidence anchors
vizro-experimental/src/vizro_experimental/chat/models/chat.pyvizro-experimental/src/vizro_experimental/chat/popup/__init__.pyvizro-experimental/src/vizro_experimental/chat/popup/popup.pyvizro-experimental/src/vizro_experimental/chat/popup/dashboard_agent.pyvizro-experimental/docs/pages/chat/{chat-component,api-reference}.mdvizro-experimental/examples/chat_component/app.pyvizro-experimental/tests/unit/{test_component,test_security}.pyvizro-experimental/tests/unit/popup/test_popup.py
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.