Skip to content

linuxhsj/askonce

Repository files navigation

AskOnce

Ask once, get all models' answers. 问一次,得到所有模型的答案。

AskOnce 是一个多模型并发查询平台,让你只需输入一次问题,即可同时获取多个主流大语言模型的回答,并以友好的格式展示对比结果。

AskOnce is a multi-model concurrent query platform that allows you to input a question once and simultaneously get responses from multiple mainstream large language models, displaying comparison results in a friendly format.

AskOnce Frontend Interface


核心特性 / Core Features

基础功能 / Basic Features

  • 一次输入,多模型响应 / Single Input, Multiple Responses - 同时向 20+ 个 AI 模型发送问题 / Send questions to 20+ AI models simultaneously
  • 实时流式输出 / Real-time Streaming - 边生成边显示,无需等待 / Display as generated, no waiting needed
  • 多视图模式 / Multi-view Modes - 卡片、表格、并排、全屏多种展示方式 / Card, table, side-by-side, fullscreen display modes
  • 并发查询引擎 / Concurrent Query Engine - 异步并发,智能重试,超时控制 / Async concurrency, smart retry, timeout control

高级功能 (来自 LLM Council) / Advanced Features (from LLM Council)

  • AI 评审机制 / AI Judge Mechanism - 使用一个 AI 分析所有回答,生成对比总结 / Use one AI to analyze all responses and generate comparison summaries
  • 匿名评审 / Anonymous Review - 模型间互相评价,消除品牌偏见 / Models evaluate each other anonymously, eliminating brand bias
  • 共识分析 / Consensus Analysis - 识别模型间的共同点和差异 / Identify commonalities and differences between models

零成本方案 (来自 FreeAskInternet) / Zero-cost Mode (from FreeAskInternet)

  • 无需 API Key / No API Key Required - 支持网页版直接调用 / Supports direct web version calls
  • 完全本地化 / Fully Localized - 所有数据存储在本地 / All data stored locally
  • 隐私优先 / Privacy First - 不向第三方服务器发送数据 / No data sent to third-party servers
  • 参考项目 / Reference Project - 详见 openclaw-zero-token / See openclaw-zero-token for details

浏览器插件 (来自 ChatHub/Ask All & Judge) / Browser Extension (from ChatHub/Ask All & Judge)

  • Chrome/Edge 扩展 / Chrome/Edge Extension - 侧边栏快速查询 / Quick query via sidebar
  • iframe 嵌入 / iframe Embedding - 直接在官方网页中操作 / Operate directly in official web pages
  • 提示词库 / Prompt Library - 快速插入常用提示词 / Quick insert of common prompts

支持的模型 / Supported Models

国际模型 / International Models

模型 / Model API 网页版 / Web 状态 / Status
Claude (Anthropic) 可用 / Available
ChatGPT (OpenAI) 可用 / Available
Gemini (Google) 可用 / Available
Grok (xAI) 可用 / Available
Perplexity 可用 / Available
Cohere - 可用 / Available
Mistral - 可用 / Available
Llama (Meta) - 可用 / Available

国内模型 / Domestic Models

模型 / Model API 网页版 / Web 状态 / Status
DeepSeek 可用 / Available
Qwen (通义千问) 可用 / Available
Doubao (豆包) - 可用 / Available
Kimi (月之暗面) 可用 / Available
GLM (智谱清言) 可用 / Available
文心一言 - 可用 / Available
讯飞星火 - 可用 / Available

项目结构 / Project Structure

askonce/
├── backend/           # 后端服务 / Backend services (FastAPI + Node.js)
│   ├── python/        # Python API 服务 / Python API service
│   └── node/          # Node.js 代理服务 / Node.js proxy service
├── frontend/          # Web 前端 / Web frontend (React + TypeScript)
├── extension/         # 浏览器扩展 / Browser extension (Chrome/Edge)
├── desktop/           # 桌面应用 / Desktop app (Electron/Tauri)
├── shared/            # 共享代码和类型 / Shared code and types
└── docs/              # 文档 / Documentation

快速开始 / Quick Start

方式一:Web 应用 / Method 1: Web Application

# 克隆仓库 / Clone repository
git clone https://github.com/linuxhsj/askonce.git
cd askonce

# 安装依赖 / Install dependencies
npm install

# 启动开发服务器 / Start development server
npm run dev

方式二:Docker 部署 / Method 2: Docker Deployment

docker-compose up -d

方式三:浏览器扩展 / Method 3: Browser Extension

  1. 打开 Chrome,访问 / Open Chrome, visit chrome://extensions/
  2. 启用"开发者模式" / Enable "Developer mode"
  3. 点击"加载已解压的扩展程序" / Click "Load unpacked"
  4. 选择 / Select extension directory

技术栈 / Tech Stack

  • 前端 / Frontend: React 18 + TypeScript + TailwindCSS + Zustand
  • 后端 / Backend: FastAPI (Python) + Express (Node.js)
  • 桌面 / Desktop: Tauri (Rust) 或 / or Electron
  • 扩展 / Extension: Chrome Extension Manifest V3
  • 数据库 / Database: SQLite (本地 / Local) / PostgreSQL (生产 / Production)

核心功能说明 / Core Features Guide

1. 并发查询引擎 / Concurrent Query Engine

// 同时向多个模型发送请求 / Send requests to multiple models simultaneously
const results = await askOnce.query({
  prompt: "解释量子计算 / Explain quantum computing",
  models: ["claude", "gpt-4", "gemini", "deepseek"],
  options: {
    timeout: 60000,
    retries: 2,
    stream: true
  }
});

2. AI 评审功能 / AI Judge Feature

// 使用一个 AI 评审所有回答 / Use one AI to judge all responses
const analysis = await askOnce.judge({
  question: "解释量子计算 / Explain quantum computing",
  responses: results,
  judgeModel: "claude",
  criteria: ["准确性 / Accuracy", "完整性 / Completeness", "清晰度 / Clarity"]
});

3. 零成本模式 / Zero-cost Mode

// 使用网页版,无需 API Key / Use web version, no API Key needed
const results = await askOnce.query({
  prompt: "你好 / Hello",
  mode: "free",  // 使用免费网页版 / Use free web version
  models: ["chatgpt-web", "claude-web", "gemini-web"]
});

贡献指南 / Contributing Guide

欢迎贡献!请查看 CONTRIBUTING.md

Welcome to contribute! Please see CONTRIBUTING.md


许可证 / License

MIT License - 详见 / See LICENSE


致谢 / Acknowledgments

本项目灵感来源于以下优秀项目 / This project is inspired by the following excellent projects:

  • ChatALL - 多模型并排对比 / Multi-model side-by-side comparison
  • ChatHub - 浏览器扩展架构 / Browser extension architecture
  • LiteLLM - 统一 API 接口 / Unified API interface
  • GodMode - 多 Webview 桌面应用 / Multi-Webview desktop app
  • LLM Council - AI 评审机制 / AI judge mechanism
  • FreeAskInternet - 零成本方案 / Zero-cost solution
  • Ask All & Judge - iframe 嵌入 / iframe embedding
  • openclaw-zero-token - 本地零成本实现 / Local zero-cost implementation

⚠️ 重要说明 / Important Notes

需要 API Key / API Key Required

本项目需要配置 API Key 才能调用 AI 模型。请先配置环境变量 / This project requires API Key configuration to call AI models. Please configure environment variables first:

# 1. 复制环境变量模板 / Copy environment template
cp .env.example .env

# 2. 编辑 .env,添加至少一个 API Key / Edit .env, add at least one API Key
OPENAI_API_KEY=sk-xxx      # OpenAI (GPT 系列 / GPT series)
# 或 / or
ANTHROPIC_API_KEY=sk-ant-xxx  # Anthropic (Claude 系列 / Claude series)
# 或 / or
DEEPSEEK_API_KEY=sk-xxx    # DeepSeek

启动步骤 / Startup Steps

# 安装依赖 / Install dependencies
cd frontend && npm install
cd ../backend/node && npm install

# 启动后端 (终端1) / Start backend (Terminal 1)
cd backend/node && npm run dev

# 启动前端 (终端2) / Start frontend (Terminal 2)
cd frontend && npm run dev

访问 / Visit http://localhost:3000 开始使用 / to start using.

详细文档 / Detailed Documentation

About

Ask once, get answers from all AI models.问一次,得到所有模型的答案。

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors