PaperBuddy is a Vercel-ready academic writing assistant for paper polishing, PDF paper understanding, and AI Q&A. It uses a server-side OpenAI-compatible chat completions API, with NVIDIA's endpoint and openai/gpt-oss-120b as the default configuration.
PaperBuddy 是一个可部署到 Vercel 的学术论文辅助网页应用,支持论文文字点评润色、PDF 文献理解和基于论文内容的 AI 问答。项目默认使用 NVIDIA OpenAI-compatible Chat Completions 接口和 openai/gpt-oss-120b 模型。
文润提供两个主要工作区:论文润色和文献解读。论文润色适合逐段检查学术表达,文献解读适合上传 PDF 后边读边问。
Wenrun has two main workspaces: paper polishing and PDF reading. Use paper polishing to review academic wording paragraph by paragraph, and use PDF reading to ask questions while reading a paper.
复制论文片段后,页面会按段落展示中文翻译、问题分析、润色结果和润色后的中文翻译。
After pasting a paper excerpt, the page shows the Chinese translation, writing issues, polished text, and polished Chinese translation paragraph by paragraph.
上传 PDF 后,页面会同时展示论文预览和对话区,适合追问研究问题、方法、结论和公式含义。
After uploading a PDF, the page shows the paper preview and chat area side by side, so you can ask about research questions, methods, conclusions, and formulas.
- 论文润色:粘贴论文片段,按段落查看原文、问题分析和润色结果。
- PDF 文献解读:上传 PDF,浏览器本地提取文本,并基于提取内容进行多轮问答。
- 无需用户登录:API Key 只配置在部署平台的服务端环境变量中,不会暴露给前端。
- 本地历史记录:润色历史和 PDF 对话历史保存在浏览器
localStorage中。
- Next.js App Router
- React + TypeScript
pdfjs-distPDF 文本提取和页面预览- Vitest 核心工具测试
- Vercel Serverless API Routes
安装依赖:
npm install复制环境变量文件:
cp .env.example .env.local在 .env.local 中填入:
LLM_API_BASE_URL=https://integrate.api.nvidia.com/v1
LLM_API_KEY=你的_NVIDIA_API_KEY
LLM_MODEL_ID=openai/gpt-oss-120b
LLM_THINKING_INTENSITY=high
LLM_MAX_TOKENS=4096启动开发服务:
npm run dev推荐流程是先把代码推送到 GitHub,再从 Vercel 导入仓库。
- 打开 Vercel 并登录。
- 点击 Add New... → Project。
- 选择 GitHub 仓库
HuayongHu/PaperBuddy。 - Framework Preset 保持为 Next.js。
- 在 Environment Variables 中添加:
LLM_API_BASE_URL=https://integrate.api.nvidia.com/v1
LLM_API_KEY=你的_NVIDIA_API_KEY
LLM_MODEL_ID=openai/gpt-oss-120b
LLM_THINKING_INTENSITY=high
LLM_MAX_TOKENS=4096- 点击 Deploy。
- 部署完成后,打开 Vercel 给出的域名即可使用。
| 变量名 | 必填 | 默认值 | 说明 |
|---|---|---|---|
LLM_API_BASE_URL |
否 | https://integrate.api.nvidia.com/v1 |
LLM API 根地址。推荐不包含 /chat/completions。 |
LLM_API_KEY |
是 | 无 | NVIDIA API Key,只能配置在服务端环境变量中。 |
LLM_MODEL_ID |
否 | openai/gpt-oss-120b |
模型 ID。 |
LLM_THINKING_INTENSITY |
否 | high |
推理强度,可选 low、medium、high。 |
LLM_MAX_TOKENS |
否 | 4096 |
单次最大输出 token 数。 |
- PDF 文本提取在浏览器本地完成,服务端不保存 PDF 文件。
- 扫描版或图片型 PDF 可能无法提取文字,问答效果会受影响。
- 润色页前端建议单次输入不超过 2000 字;服务端最大接受 10000 字符。
- PDF 问答最多使用前 60000 字符的提取文本。
npm test
npm run build
npm run dev- Paper polishing: paste an academic paragraph or section and get paragraph-by-paragraph comments and revised text.
- PDF understanding: upload a PDF, extract text in the browser, and ask follow-up questions based on the paper content.
- No user accounts: the API key is stored only as a server-side environment variable.
- Local history: polishing history and PDF chat history are stored in browser
localStorage.
- Next.js App Router
- React + TypeScript
pdfjs-distfor PDF text extraction and preview- Vitest for core utility tests
- Vercel Serverless API Routes
Install dependencies:
npm installCopy the environment file:
cp .env.example .env.localSet the environment variables in .env.local:
LLM_API_BASE_URL=https://integrate.api.nvidia.com/v1
LLM_API_KEY=your_nvidia_api_key
LLM_MODEL_ID=openai/gpt-oss-120b
LLM_THINKING_INTENSITY=high
LLM_MAX_TOKENS=4096Start the development server:
npm run devOpen http://localhost:3000.
The recommended workflow is to push the code to GitHub first, then import the repository from Vercel.
- Open Vercel and sign in.
- Click Add New... → Project.
- Select the GitHub repository
HuayongHu/PaperBuddy. - Keep Framework Preset as Next.js.
- Add these Environment Variables:
LLM_API_BASE_URL=https://integrate.api.nvidia.com/v1
LLM_API_KEY=your_nvidia_api_key
LLM_MODEL_ID=openai/gpt-oss-120b
LLM_THINKING_INTENSITY=high
LLM_MAX_TOKENS=4096- Click Deploy.
- Open the Vercel deployment URL when the build finishes.
| Name | Required | Default | Description |
|---|---|---|---|
LLM_API_BASE_URL |
No | https://integrate.api.nvidia.com/v1 |
LLM API base URL. Prefer omitting /chat/completions. |
LLM_API_KEY |
Yes | None | NVIDIA API key. Keep it server-side only. |
LLM_MODEL_ID |
No | openai/gpt-oss-120b |
Model ID. |
LLM_THINKING_INTENSITY |
No | high |
Reasoning effort: low, medium, or high. |
LLM_MAX_TOKENS |
No | 4096 |
Maximum output tokens for one response. |
- PDF text extraction happens in the browser. The server does not store uploaded PDF files.
- Scanned or image-only PDFs may not produce extractable text.
- The polishing page recommends up to 2000 characters per request; the server accepts up to 10000 characters.
- PDF Q&A uses up to the first 60000 extracted characters.
npm test
npm run build
npm run devMIT

