Multi-Chat
Ask one question, let up to five LLMs answer it side by side. A small, working showcase of GraphLang: the chat logic is a graph file (chat_turn.graph.yaml), and this Streamlit app only draws the conversation and runs that graph, once per chatbot per question.
Install
pip install dd-chat
dd-chat # opens the app; chats are saved in ~/.dd-chat (or $DD_CHAT_HOME)
Features
- Compare models: 1 to 5 chatbots, each with its own provider, model, "turns it sees", language, temperature and instructions (a system prompt, so you can compare prompts as well as models). Every question goes to all of them in parallel, each keeps its own conversation, and each answer appears in its column as soon as it arrives.
- Providers:
anthropic(through the Claude CLI),anthropic-api,openrouter,openai,deepseek,qwen,ollama. - Settings page: fetch each provider's model list, tick the models you want; only those appear in the Model dropdown (saved in the SQLite database
~/.dd-chat/multi_chat.db). - Easy to line up: numbered questions (
[4] what is ...) in every column, response time, tokens and cost per answer, totals per chat, a scrollbar per chatbot, adjustable pane height and font size. - Feedback and blind mode: 📋 copy, 🔊 read aloud, 👍 / 👎, 🏆 best answer per question. Blind mode hides the model names until you pick the best answer.
- Compare answers: a model of your choice compares the answers to one question (agree, differ, doubtful, most complete); it is a second graph,
compare_answers.graph.yaml. - Retry and redo: a failed chatbot can be retried alone; ↻ asks a chatbot its latest question again.
- Batch: upload a list of questions (.txt, .csv, .yaml) and every chatbot answers them all.
- Presets: save a line-up of chatbots under a name and load it later.
- Attachments: text files and PDFs go to every chatbot; images to the providers that can read them.
- Dead links flagged: the links in each answer are checked, and dead ones get ❌ (addresses on your own machine or network are never requested).
- Export: YAML (
GraphLang-YYMMDD-HHMMSS.chat.yaml, complete, can be imported again) or Markdown, organised by question. - Review page: every chat is saved; search them, read them, open one on the Chats page to go on, disable or delete it, import an export file. A leaderboard shows, per model, the 🏆 wins, thumbs, time and cost.
- About page: how a question travels through the graph, and the stack behind it.
Quick Setup
Python 3.11 or newer.
git clone https://github.com/digital-duck/dd-chat.git
cd dd-chat
python -m venv .venv && source .venv/bin/activate
# conda create -n chat python=3.11
# conda activate chat
pip install -r requirements.txt
streamlit run src/app.py # from the repo root, so .streamlit/config.toml applies
What each provider needs:
| Provider | Needs | Cost |
|---|---|---|
anthropic |
the Claude CLI installed and signed in (no images, no temperature) | billed |
anthropic-api |
export ANTHROPIC_API_KEY=... |
billed |
openrouter |
export OPENROUTER_API_KEY=... (the model list loads without it) |
billed |
openai |
export OPENAI_API_KEY=... |
billed |
deepseek |
export DEEPSEEK_API_KEY=... |
billed |
qwen |
export DASHSCOPE_API_KEY=... |
billed |
ollama |
Ollama running at localhost:11434 (or $OLLAMA_HOST) with a model pulled |
free |
Costs shown are what the provider reports, or OpenRouter's prices times the tokens; the Claude CLI's cost is not known (its token counts are estimates).
requirements.txt installs GraphLang from GitHub, because this app needs graphlang.grafr.metering, which the PyPI release (0.1.1) does not have yet.
The graph
add_question (SOLVE) -> trim (SOLVE) -> answer (GENERATE) -> add_reply (SOLVE)
The history and the question go in (with the chatbot's language, instructions and the formatting rules); the question is appended, the history is trimmed to the last N turns, the model replies (one call, capped at one per run), and the reply and the new history come out. The same graph runs without the app:
graf validate src/chat_turn.graph.yaml
graf run src/chat_turn.graph.yaml --llm claude_cli:claude-sonnet-5-5 \
--param question="What is a graph?" --param history='[]'
Layout
The code is in src/; the root keeps the docs, requirements, tests and .streamlit/config.toml. Scratch files (the GraphLang kernels' sockets) go in tmp/, which git ignores.
| Path | What |
|---|---|
src/app.py |
entry point: the four pages |
src/views/multi_chat.py |
the Chats page |
src/views/review.py |
the Review page: saved chats, import, leaderboard |
src/views/config_llm.py |
the Settings page |
src/views/about.py |
the About page |
src/chat_turn.graph.yaml |
one chat turn as a GraphLang graph |
src/compare_answers.graph.yaml |
a comparison of the answers to one question |
src/chat_engine.py |
runs the graphs (and the image turns, which bypass them); tokens, cost, kernel reuse |
src/chat_db.py |
SQLite: sessions, messages, comparisons, settings |
src/chat_models.py |
providers, their model lists and the saved selection |
src/chat_export.py |
YAML and Markdown export, YAML import |
src/chat_render.py |
how an answer is shown (both pages) |
src/link_check.py |
the dead-link check |
tests/ |
pytest tests (no model is called) |
Tests
pip install -r requirements-dev.txt
pytest tests
Status
An early prototype, built on an early prototype (GraphLang). Anthropic and OpenRouter calls cost money: every question is one call per chatbot.
License
Apache License 2.0, see LICENSE.
Metadata
Release files for dd-chat 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dd_chat-0.1.1.tar.gz | 54.1 kB | Without provenance | Details for dd_chat-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dd_chat-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for dd_chat-0.1.1-py3-none-any.whl |
Total release size: 109.4 kB
Release files / dd_chat-0.1.1.tar.gz
| Download URL | dd_chat-0.1.1.tar.gz |
|---|---|
| Size | 54.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b594a0c670a0ffe744cd6fdcd614fc8b2690afa8ab1d8ec4112cab3832e6df14
|
|
BLAKE2b-256 checksum How to use checksums |
e632191bffc0b5183b95fbe22e8f8f310cf6e0cb5a21b05ac797769e4b0ae27e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.5
|
Release files / dd_chat-0.1.1-py3-none-any.whl
| Download URL | dd_chat-0.1.1-py3-none-any.whl |
|---|---|
| Size | 55.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41550009d5784f9e9b0fa2386e01025992129f11f076dbc318c24902c83578f8
|
|
BLAKE2b-256 checksum How to use checksums |
1e2d8bba57ac9e983d9eb6bdb703f0321e6d827edd6823f7c3ef4e98c6995fd8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.5
|
Security for dd-chat 0.1.1
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.