- 🤖 Multi-Model AI Support: Compatible with OpenAI, Anthropic Claude, Google Gemini, and OpenAI-compatible APIs
- ✍️ Smart Writing Assistance:
- Improve writing quality and clarity
- Fix grammar and spelling errors
- Translate between languages
- Expand or shorten text
- Custom text actions
- 💬 Intelligent Chat: Context-aware conversations about your LaTeX document
- 🔧 Function Calling: AI can directly interact with your document through tools
- 📚 Literature Management: Search and cite academic papers with CrossRef integration
- 🎨 Modern UI: Beautiful, responsive sidebar interface
- 🔒 Privacy-First: All data stored locally, no external servers
- 🌐 OAuth Support: Use ChatGPT subscription without API keys
-
Clone the repository
git clone https://github.com/BigCatNotFat/PacificOceanAI.git cd pacific-ocean-ai -
Install dependencies
npm install
-
Build the extension
npm run build
-
Load in Chrome/Edge
- Open
chrome://extensions/(oredge://extensions/) - Enable "Developer mode"
- Click "Load unpacked"
- Select the
distfolder
- Open
- Open Overleaf: Navigate to any Overleaf project
- Configure API: Click the extension icon → Settings → Add your API key
- Start Using: Select text in the editor and use the AI assistant
- OpenAI: GPT-4, GPT-4 Turbo, GPT-3.5
- Anthropic: Claude 3.5 Sonnet, Claude 3 Opus/Haiku
- Google: Gemini 1.5 Pro/Flash, Gemini 2.0 Flash
- OpenAI-Compatible: Any API following OpenAI's format
- ChatGPT OAuth: Use your ChatGPT subscription (no API key needed)
- Open extension settings
- Click "Add Model"
- Enter model details:
- Name: Display name
- Model ID: API model identifier
- Provider: Select provider type
- API Key: Your API key
- Base URL: (Optional) Custom API endpoint
# Install dependencies
npm install
# Development mode with hot reload
npm run dev
# Build for production
npm run build
# Build bridge module
npm run build:bridge
# Build everything
npm run build:all
# Pack extension
npm run packpacific-ocean-ai/
├── src/
│ ├── base/ # Base utilities
│ ├── extension/ # Extension entry points
│ │ ├── background/ # Service worker
│ │ ├── content/ # Content script
│ │ ├── options/ # Settings page
│ │ └── popup/ # Popup UI
│ ├── platform/ # Platform abstractions
│ ├── services/ # Core services
│ │ ├── agent/ # AI agent system
│ │ ├── editor/ # Overleaf integration
│ │ ├── llm/ # LLM providers
│ │ └── literature/ # Literature search
│ ├── workbench/ # UI components
│ └── utils/ # Utilities
├── public/ # Static assets
├── scripts/ # Build scripts
└── dist/ # Build output
PacificOceanAI uses a clean, modular architecture:
- Dependency Injection: Service-based architecture with DI container
- Multi-Provider Support: Unified interface for different AI providers
- Tool System: Extensible function calling framework
- Bridge Pattern: Safe communication with Overleaf editor
- Stream Processing: Real-time AI response streaming
Contributions are welcome! Please read our Contributing Guide first.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) - see the LICENSE file for details. Any modified version must also be open-sourced under the same license, including when used as a network service.
- Overleaf - Online LaTeX editor
- OpenAI - GPT models
- Anthropic - Claude models
- Google - Gemini models
- React - UI framework
- Vite - Build tool
We take your privacy seriously. Read our Privacy Policy to learn how we handle your data.
Key Points:
- ✅ All data stored locally on your device
- ✅ No external servers or analytics
- ✅ You control your API keys
- ✅ Open source and transparent
- 🤖 多模型支持: 兼容 OpenAI、Anthropic Claude、Google Gemini 及 OpenAI 兼容 API
- ✍️ 智能写作辅助:
- 改进写作质量和清晰度
- 修正语法和拼写错误
- 多语言翻译
- 扩展或缩短文本
- 自定义文本操作
- 💬 智能对话: 基于 LaTeX 文档的上下文对话
- 🔧 函数调用: AI 可以通过工具直接与文档交互
- 📚 文献管理: 通过 CrossRef 搜索和引用学术论文
- 🎨 现代化界面: 美观、响应式的侧边栏界面
- 🔒 隐私优先: 所有数据本地存储,无外部服务器
- 🌐 OAuth 支持: 使用 ChatGPT 订阅,无需 API 密钥
-
克隆仓库
git clone https://github.com/BigCatNotFat/PacificOceanAI.git cd pacific-ocean-ai -
安装依赖
npm install
-
构建扩展
npm run build
-
在 Chrome/Edge 中加载
- 打开
chrome://extensions/(或edge://extensions/) - 启用"开发者模式"
- 点击"加载已解压的扩展程序"
- 选择
dist文件夹
- 打开
- 打开 Overleaf: 导航到任意 Overleaf 项目
- 配置 API: 点击扩展图标 → 设置 → 添加你的 API 密钥
- 开始使用: 在编辑器中选择文本并使用 AI 助手
- OpenAI: GPT-4, GPT-4 Turbo, GPT-3.5
- Anthropic: Claude 3.5 Sonnet, Claude 3 Opus/Haiku
- Google: Gemini 1.5 Pro/Flash, Gemini 2.0 Flash
- OpenAI 兼容: 任何遵循 OpenAI 格式的 API
- ChatGPT OAuth: 使用你的 ChatGPT 订阅(无需 API 密钥)
- 打开扩展设置
- 点击"添加模型"
- 输入模型详情:
- 名称:显示名称
- 模型 ID:API 模型标识符
- 提供商:选择提供商类型
- API 密钥:你的 API 密钥
- Base URL:(可选)自定义 API 端点
# 安装依赖
npm install
# 开发模式(热重载)
npm run dev
# 生产构建
npm run build
# 构建桥接模块
npm run build:bridge
# 构建所有内容
npm run build:all
# 打包扩展
npm run packpacific-ocean-ai/
├── src/
│ ├── base/ # 基础工具
│ ├── extension/ # 扩展入口点
│ │ ├── background/ # Service Worker
│ │ ├── content/ # Content Script
│ │ ├── options/ # 设置页面
│ │ └── popup/ # 弹出窗口
│ ├── platform/ # 平台抽象
│ ├── services/ # 核心服务
│ │ ├── agent/ # AI 代理系统
│ │ ├── editor/ # Overleaf 集成
│ │ ├── llm/ # LLM 提供商
│ │ └── literature/ # 文献搜索
│ ├── workbench/ # UI 组件
│ └── utils/ # 工具函数
├── public/ # 静态资源
├── scripts/ # 构建脚本
└── dist/ # 构建输出
PacificOceanAI 采用清晰的模块化架构:
- 依赖注入: 基于服务的架构与 DI 容器
- 多提供商支持: 不同 AI 提供商的统一接口
- 工具系统: 可扩展的函数调用框架
- 桥接模式: 与 Overleaf 编辑器的安全通信
- 流式处理: 实时 AI 响应流
欢迎贡献!请先阅读我们的贡献指南。
- Fork 本仓库
- 创建你的特性分支 (
git checkout -b feature/amazing-feature) - 提交你的更改 (
git commit -m 'Add some amazing feature') - 推送到分支 (
git push origin feature/amazing-feature) - 开启一个 Pull Request
本项目采用 GNU Affero 通用公共许可证 v3.0 (AGPL-3.0) - 详见 LICENSE 文件。任何修改版本必须以相同许可证开源,包括作为网络服务使用时。
- Overleaf - 在线 LaTeX 编辑器
- OpenAI - GPT 模型
- Anthropic - Claude 模型
- Google - Gemini 模型
- React - UI 框架
- Vite - 构建工具
我们非常重视你的隐私。阅读我们的隐私政策了解我们如何处理你的数据。
要点:
- ✅ 所有数据本地存储在你的设备上
- ✅ 无外部服务器或分析
- ✅ 你控制你的 API 密钥
- ✅ 开源且透明
Made with ❤️ by the PacificOceanAI Team