Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ Optional CLI flags (API):
| **OpenRouter** | `openrouter.ai/api/v1` | Supports Gemini/Claude/others |
| **Bianxie** | `api.bianxie.ai/v1` | OpenAI-compatible API |
| **Gemini (Google)** | `generativelanguage.googleapis.com/v1beta` | Official Google Gemini API (`google-genai`) |
| **MiniMax** | `api.minimax.io/v1` | OpenAI-compatible API; SVG generation only (no image gen) |

Common CLI flags:

Expand All @@ -337,6 +338,33 @@ Common CLI flags:
- `--merge_threshold` (0 disables merging)
- `--optimize_iterations` (0 disables optimization)
- `--reference_image_path` (optional)
- `--figure_path` (pre-generated figure image, skips step 1)

### Using MiniMax

[MiniMax](https://www.minimaxi.com/) provides OpenAI-compatible LLM APIs with strong multimodal capabilities (MiniMax-M2.7, 204K context). MiniMax excels at SVG generation and text understanding tasks but does not support image generation. Use `--figure_path` to provide a pre-generated figure:

```bash
# Step 1: Generate figure with another provider
python autofigure2.py \
--method_file paper.txt \
--output_dir outputs/step1 \
--provider gemini \
--api_key YOUR_GEMINI_KEY \
--stop_after 1

# Step 2: Use MiniMax for SVG generation (steps 2-5)
export MINIMAX_API_KEY="your-minimax-key"
python autofigure2.py \
--method_file paper.txt \
--output_dir outputs/demo \
--provider minimax \
--figure_path outputs/step1/figure.png
```

Available MiniMax models:
- `MiniMax-M2.7` (default) — latest model, 204K context
- `MiniMax-M2.7-highspeed` — faster variant, 204K context

### Custom Provider / Custom Base URL

Expand Down
30 changes: 29 additions & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,11 @@ python autofigure2.py \
| **OpenRouter** | `openrouter.ai/api/v1` | 支持 Gemini/Claude/其他模型 |
| **Bianxie** | `api.bianxie.ai/v1` | 兼容 OpenAI 接口 |
| **Gemini (Google)** | `generativelanguage.googleapis.com/v1beta` | Google 官方 Gemini API(`google-genai`) |
| **MiniMax** | `api.minimax.io/v1` | 兼容 OpenAI 接口;仅 SVG 生成(不支持图像生成) |

常用 CLI 参数:

- `--provider` (openrouter | bianxie | gemini)
- `--provider` (openrouter | bianxie | gemini | minimax)
- `--image_model`, `--svg_model`
- `--image_size` (1K | 2K | 4K,仅 Gemini)
- `--sam_prompt` (逗号分隔的提示词)
Expand All @@ -327,6 +328,33 @@ python autofigure2.py \
- `--merge_threshold` (0 禁用合并)
- `--optimize_iterations` (0 禁用优化)
- `--reference_image_path` (可选)
- `--figure_path` (预生成图片路径,跳过步骤一)

### 使用 MiniMax

[MiniMax](https://www.minimaxi.com/) 提供兼容 OpenAI 的 LLM API,具有强大的多模态能力(MiniMax-M2.7,204K 上下文)。MiniMax 擅长 SVG 生成和文本理解,但不支持图像生成。使用 `--figure_path` 提供预生成的图片:

```bash
# 步骤 1:用其他 provider 生成图片
python autofigure2.py \
--method_file paper.txt \
--output_dir outputs/step1 \
--provider gemini \
--api_key YOUR_GEMINI_KEY \
--stop_after 1

# 步骤 2:用 MiniMax 进行 SVG 生成(步骤 2-5)
export MINIMAX_API_KEY="your-minimax-key"
python autofigure2.py \
--method_file paper.txt \
--output_dir outputs/demo \
--provider minimax \
--figure_path outputs/step1/figure.png
```

可用的 MiniMax 模型:
- `MiniMax-M2.7`(默认)— 最新模型,204K 上下文
- `MiniMax-M2.7-highspeed` — 高速版本,204K 上下文

### 自定义提供商 / 自定义 Base URL

Expand Down
Loading