|
| 1 | +# OpenAI Provider Plugin for 302 AI Studio |
| 2 | + |
| 3 | +Official OpenAI API provider plugin for [302 AI Studio](https://github.com/302ai/302-AI-Studio-SV). |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- 🚀 Support for all GPT models (GPT-3.5, GPT-4, GPT-4 Turbo, GPT-4o) |
| 8 | +- 🧠 Support for reasoning models (o1, o3) |
| 9 | +- 👁️ Vision capabilities (GPT-4 Vision, GPT-4o) |
| 10 | +- 🔧 Function calling support |
| 11 | +- 🌐 Custom base URL support (for proxies) |
| 12 | +- 🏢 Organization ID support |
| 13 | + |
| 14 | +## Installation |
| 15 | + |
| 16 | +### Via Plugin Marketplace |
| 17 | + |
| 18 | +1. Open 302 AI Studio |
| 19 | +2. Go to Settings → Plugins → Marketplace |
| 20 | +3. Search for "OpenAI Provider" |
| 21 | +4. Click "Install" |
| 22 | + |
| 23 | +### Manual Installation |
| 24 | + |
| 25 | +1. Download the latest `.zip` file from [Releases](https://github.com/302ai/openai-plugin/releases) |
| 26 | +2. In 302 AI Studio, go to Settings → Plugins |
| 27 | +3. Click "Install from File" and select the downloaded ZIP |
| 28 | + |
| 29 | +## Configuration |
| 30 | + |
| 31 | +After installation, configure the plugin: |
| 32 | + |
| 33 | +1. Go to Settings → Providers |
| 34 | +2. Select "OpenAI" provider |
| 35 | +3. Enter your OpenAI API key |
| 36 | +4. (Optional) Configure custom base URL or organization ID |
| 37 | + |
| 38 | +### Configuration Options |
| 39 | + |
| 40 | +- **API Key** (required): Your OpenAI API key from [platform.openai.com/api-keys](https://platform.openai.com/api-keys) |
| 41 | +- **Base URL** (optional): Custom API endpoint (default: `https://api.openai.com/v1`) |
| 42 | +- **Organization ID** (optional): Your OpenAI organization ID for multi-org accounts |
| 43 | + |
| 44 | +## Supported Models |
| 45 | + |
| 46 | +This plugin automatically fetches and supports all available GPT models from your OpenAI account, including: |
| 47 | + |
| 48 | +- GPT-4o and GPT-4o mini |
| 49 | +- GPT-4 Turbo and GPT-4 |
| 50 | +- GPT-3.5 Turbo |
| 51 | +- o1 and o3 (reasoning models) |
| 52 | + |
| 53 | +## Development |
| 54 | + |
| 55 | +### Prerequisites |
| 56 | + |
| 57 | +- Node.js 20+ |
| 58 | +- pnpm 8+ |
| 59 | + |
| 60 | +### Setup |
| 61 | + |
| 62 | +```bash |
| 63 | +# Install dependencies |
| 64 | +pnpm install |
| 65 | + |
| 66 | +# Build plugin |
| 67 | +pnpm run build |
| 68 | + |
| 69 | +# Package as ZIP |
| 70 | +pnpm run package |
| 71 | +``` |
| 72 | + |
| 73 | +### Project Structure |
| 74 | + |
| 75 | +``` |
| 76 | +openai-plugin/ |
| 77 | +├── src/ |
| 78 | +│ └── index.ts # Plugin implementation |
| 79 | +├── dist/ # Compiled output (generated) |
| 80 | +├── plugin.json # Plugin metadata |
| 81 | +├── package.json |
| 82 | +├── tsconfig.json |
| 83 | +├── tsup.config.ts |
| 84 | +└── scripts/ |
| 85 | + └── package.js # ZIP packaging script |
| 86 | +``` |
| 87 | + |
| 88 | +## License |
| 89 | + |
| 90 | +MIT License - see [LICENSE](LICENSE) file for details. |
| 91 | + |
| 92 | +## Links |
| 93 | + |
| 94 | +- [302 AI Studio](https://github.com/302ai/302-AI-Studio-SV) |
| 95 | +- [Plugin SDK Documentation](https://github.com/302ai/302-AI-Studio-SV/tree/main/packages/plugin-sdk) |
| 96 | +- [OpenAI Documentation](https://platform.openai.com/docs) |
| 97 | +- [Report Issues](https://github.com/302ai/openai-plugin/issues) |
0 commit comments