Skip to content

wenjiewangwwj/AIinteractive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dual AI Chat — Claude + ChatGPT

A Streamlit app that lets you ask both Claude and ChatGPT the same question at once, share attachments with both, and (optionally) let them see each other's reasoning and revise their answers. You can also add your own opinion that both models will consider.

What it does

  • Single prompt, two models — type once, both Claude and ChatGPT answer.
  • Attachments — upload PDFs, images, or text files once; both models see them.
  • Your opinion — optional text box for context you want both AIs to consider.
  • Debate rounds — let each model see the other's answer and revise (0–3 rounds).
  • Conversation history — follow-up questions remember earlier turns.

Quick start (local)

1. Clone or download

git clone <your-repo-url>
cd dual_ai_app

2. Install Python dependencies

Use Python 3.10 or newer.

python -m venv .venv
source .venv/bin/activate     # Windows: .venv\Scripts\activate
pip install -r requirements.txt

3. Add your API keys

You have two options:

Option A — secrets file (recommended):

mkdir -p .streamlit
cp .streamlit/secrets.toml.example .streamlit/secrets.toml
# Then edit .streamlit/secrets.toml and paste your real keys.

Option B — paste them in the sidebar each session.

Get keys here:

Both require a small prepaid balance — $5–10 is plenty to start.

4. Run

streamlit run app.py

Your browser will open at http://localhost:8501.

Deploying free on Streamlit Community Cloud

  1. Push this folder to a GitHub repository (the included .gitignore keeps your secrets.toml out of git — verify before pushing).

  2. Go to https://share.streamlit.io and sign in with GitHub.

  3. Click New app, pick your repo, and set the main file to app.py.

  4. Under Advanced settings → Secrets, paste:

    ANTHROPIC_API_KEY = "sk-ant-..."
    OPENAI_API_KEY = "sk-..."
  5. Deploy. You'll get a public URL like https://your-app.streamlit.app.

If you want the app private, set the app to private in Streamlit Cloud settings (requires a paid plan) or just keep using it locally.

Settings (sidebar)

  • Claude model — defaults to claude-opus-4-7 (most capable). Switch to claude-sonnet-4-6 for cheaper, faster answers.
  • OpenAI model — defaults to gpt-5.5. Use gpt-5.4-mini for cheaper runs.
  • Debate rounds — 0 means just show both initial answers. 1 means each model gets to see the other's answer once and revise. Higher = deeper back-and-forth.

Cost notes

Each "ask both" sends two API calls (one per model). Each debate round adds two more. Rough order of magnitude for a typical chat-length question with no attachments: a fraction of a cent per round on the cheap models, a few cents on the top-tier models. Big PDFs/images cost more (more input tokens).

File support

  • Images (.png, .jpg, .gif, .webp) — both models see them natively.
  • PDFs — both models read them natively.
  • Word documents (.docx) — text is extracted (paragraphs + tables) before sending.
  • Excel spreadsheets (.xlsx) — cell values are extracted, sheet by sheet.
  • PowerPoint (.pptx) — slide text is extracted.
  • Text-like files (.txt, .md, .csv, code files) — inlined as text.

Legacy binary Office formats (.doc, .xls, .ppt) are not supported — re-save them as the modern Office format or export to PDF. Other unknown binary files will be flagged with a warning rather than dumped as garbage into the prompt.

Troubleshooting

About

Linking ChatGPT and Claude

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages