feat(skills): explain nanobot usage from bundled documentation (#6176)

* feat(skills): add nanobot documentation guide with bundled docs

* docs: prefer graphical setup and align bundled guides with runtime

* docs: lead provider setup with built-in endpoint defaults

* fix: preserve documentation packaging and lookup across install paths

* fix(skills): narrow documentation loading to relevant sections

* refactor(skills): keep documentation guidance concise

* fix(docs): complete first-use workflows and clarify runtime boundaries

* style(docs): remove manual paragraph wrapping

* docs: guide first-run users to conversational setup help

* docs: fold README installation alternatives and details

* docs: separate README alert marker from its body

* docs: clarify README onboarding and runtime boundaries
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-13 00:44:25 +08:00
1 parent 23941355a8
commit cd2a863710
61 files changed
+1729 -634

No files matched your search

+60 -5
View File
@@ -2,18 +2,19 @@
nanobot can generate and edit images through the `generate_image` tool. Enable the tool in WebUI Settings, then ask for an image normally in chat; the agent decides when to call it and can keep iterating on generated images in the same conversation.
The feature is disabled by default. Open **Settings → Image**, choose a configured provider and model, enable image generation, and save. The running gateway applies the change immediately. If that screen is not available in your installed version, use the manual config below.
The feature is disabled by default. Open **Settings → Capabilities → Image generation**, choose a configured provider and model, enable image generation, and save. The running gateway applies the change immediately. If that screen is not available in your installed version, use the manual config below.
## Quick Setup
**WebUI**
1. Add the image provider credential under **Settings → Models → Manage providers** if it is not already configured.
2. Open **Settings → Image**.
1. Add the image provider credential under **Settings → Models → Provider → Add provider** if it is not already configured.
2. Open **Settings → Capabilities → Image generation**.
3. Select the provider and image model, then enable image generation.
4. Save and ask for a simple test image. If the gateway cannot apply the change live, WebUI will prompt you to restart it.
**Manual config**
<details>
<summary>Manual configuration</summary>
This snippet uses the current built-in image-generation default so the JSON has concrete names. It is not a provider recommendation; replace `provider` and `model` with any supported image provider and model you intend to use.
@@ -34,6 +35,8 @@ This snippet uses the current built-in image-generation default so the JSON has
}
```
</details>
See [Provider Notes](#provider-notes) for Custom, AIHubMix, MiniMax, Gemini, Ollama, StepFun, Zhipu, and ModelScope configuration examples.
> [!TIP]
@@ -90,10 +93,15 @@ Both camelCase and snake_case config keys are accepted, but docs use camelCase t
## Provider Notes
For each provider below, add or edit its connection in **Settings → Models**, then choose the provider and image model in **Settings → Capabilities → Image generation**. Connection-specific headers, request bodies, and proxy settings are in the provider editor's **Advanced options**. The collapsed JSON examples are for manual deployments.
### OpenRouter
OpenRouter uses a chat-completions style image response. Configure:
<details>
<summary>Manual configuration</summary>
```json
{
"tools": {
@@ -106,6 +114,8 @@ OpenRouter uses a chat-completions style image response. Configure:
}
```
</details>
Use a model that supports image generation and image editing if you want reference-image edits.
### OpenAI Codex
@@ -138,6 +148,9 @@ POST /v1/images/generations
The response must include generated images in `data[].b64_json` or `data[].url`. Native prediction APIs, such as Replicate's `/v1/models/{owner}/{model}/predictions`, are not directly compatible unless you put an OpenAI-compatible gateway in front of them.
<details>
<summary>Manual configuration</summary>
Configure:
```json
@@ -158,6 +171,8 @@ Configure:
}
```
</details>
The `apiBase` is required. The provider sends requests to `{apiBase}/images/generations` using the OpenAI Images API format with `response_format: "b64_json"`. The `apiKey` is optional for local or unauthenticated endpoints. Reference-image edits are not supported by the generic `custom` provider.
`extraBody` can adapt provider-specific quirks because it is merged last into the request body. Examples:
@@ -176,6 +191,9 @@ AIHubMix `gpt-image-2-free` is supported through AIHubMix's unified predictions
/v1/models/openai/gpt-image-2-free/predictions
```
<details>
<summary>Manual configuration</summary>
Configure:
```json
@@ -198,12 +216,17 @@ Configure:
}
```
</details>
`quality: low` is optional. It can make free image models faster and less likely to time out, but it is not required for correctness.
### MiniMax
MiniMax `image-01` supports text-to-image and reference-image (subject reference) edits. Supported aspect ratios are `1:1`, `16:9`, `4:3`, `3:2`, `2:3`, `3:4`, `9:16`, and `21:9`.
<details>
<summary>Manual configuration</summary>
```json
{
"providers": {
@@ -222,6 +245,8 @@ MiniMax `image-01` supports text-to-image and reference-image (subject reference
}
```
</details>
### Gemini
nanobot supports two Gemini image generation model families via Google's Generative Language API:
@@ -233,6 +258,9 @@ nanobot supports two Gemini image generation model families via Google's Generat
For reference-image edits, use a Gemini Flash image model:
<details>
<summary>Manual configuration</summary>
```json
{
"providers": {
@@ -250,12 +278,17 @@ For reference-image edits, use a Gemini Flash image model:
}
```
</details>
Imagen 4 supports the aspect ratios `1:1`, `9:16`, `16:9`, `3:4`, and `4:3`. Unsupported ratios are ignored and the model uses its default. The `defaultImageSize` setting has no effect on Gemini models; sizing is controlled by `defaultAspectRatio` only. Reference images passed with an Imagen model are ignored (with a warning logged).
### Ollama
Ollama's experimental native image generation API works with local servers and hosted ollama.com models. Local access at `http://localhost:11434/api` does not require an API key; set `providers.ollama.apiKey` only when targeting `https://ollama.com/api`.
<details>
<summary>Manual configuration</summary>
```json
{
"providers": {
@@ -275,6 +308,8 @@ Ollama's experimental native image generation API works with local servers and h
}
```
</details>
Ollama maps `defaultAspectRatio` and `defaultImageSize` to native `width` and `height` values. Reference images are not supported by this integration.
### StepFun
@@ -283,6 +318,9 @@ StepFun (阶跃星辰) `step-image-edit-2` supports text-to-image generation. T
Supported aspect ratios: `1:1`, `16:9`, `9:16`, `3:4`, `4:3`. Sizes are specified as `WIDTHxHEIGHT` (e.g. `1024x1024`, `1280x800`, `800x1280`).
<details>
<summary>Manual configuration</summary>
```json
{
"providers": {
@@ -300,6 +338,8 @@ Supported aspect ratios: `1:1`, `16:9`, `9:16`, `3:4`, `4:3`. Sizes are specifi
}
```
</details>
> [!NOTE]
> The StepFun provider reuses the existing `providers.stepfun` config block (the same one used for StepFun's LLM API). Set `providers.stepfun.apiKey` once and it is shared between text and image generation.
>
@@ -309,6 +349,9 @@ Supported aspect ratios: `1:1`, `16:9`, `9:16`, `3:4`, `4:3`. Sizes are specifi
StepPlan is StepFun's subscription tier and uses a different API base URL. The image generation endpoint path is the same — just override `apiBase`:
<details>
<summary>Manual configuration</summary>
```json
{
"providers": {
@@ -327,6 +370,8 @@ StepPlan is StepFun's subscription tier and uses a different API base URL. The i
}
```
</details>
`apiBase` takes precedence over the registry default, so with the StepPlan base URL configured, image requests are sent to `https://api.stepfun.ai/step_plan/v1/images/generations` — the same path prefix used for LLM calls. The API key is shared with the standard StepFun provider.
### Zhipu
@@ -335,6 +380,9 @@ Zhipu (智谱) `glm-image` model supports text-to-image generation. The API retu
Supported aspect ratios: `1:1`, `16:9`, `9:16`, `3:4`, `4:3`. Sizes can be specified as `WIDTHxHEIGHT` (e.g. `1280x1280`, `1728x960`) or using aspect ratio presets.
<details>
<summary>Manual configuration</summary>
```json
{
"providers": {
@@ -352,6 +400,8 @@ Supported aspect ratios: `1:1`, `16:9`, `9:16`, `3:4`, `4:3`. Sizes can be speci
}
```
</details>
Other supported models: `cogview-4`, `cogview-4-250304`, `cogview-3-flash`. Reference images are not supported by this integration.
### ModelScope
@@ -360,6 +410,9 @@ ModelScope (魔搭社区) API-Inference supports text-to-image generation and im
Supported aspect ratios: `1:1`, `16:9`, `9:16`, `3:4`, `4:3`. Sizes can be specified as `WIDTHxHEIGHT` (e.g. `1024x1024`, `1664x928`) or using aspect ratio presets.
<details>
<summary>Manual configuration</summary>
```json
{
"providers": {
@@ -377,6 +430,8 @@ Supported aspect ratios: `1:1`, `16:9`, `9:16`, `3:4`, `4:3`. Sizes can be speci
}
```
</details>
## Artifacts
Generated images are stored under the active nanobot instance's media directory:
@@ -429,7 +484,7 @@ Use the reference image. Keep the same robot and composition, change the palette
| Symptom | Check |
|---------|-------|
| `generate_image` is not available | Enable image generation in **Settings → Image** and save. For manual config changes, restart the gateway |
| `generate_image` is not available | Enable image generation in **Settings → Capabilities → Image generation** and save. For manual config changes, restart the gateway |
| Missing API key error | Configure `providers.<provider>.apiKey`; if using `${VAR_NAME}`, confirm the environment variable is visible to the gateway process |
| `unsupported image generation provider` | Use `openrouter`, `openai`, `openai_codex`, `custom`, `aihubmix`, `minimax`, `gemini`, `ollama`, `stepfun`, `zhipu`, or `modelscope` |
| AIHubMix says `Incorrect model ID` | Use `model: "gpt-image-2-free"`; nanobot expands it to the required `openai/gpt-image-2-free` model path internally |