mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-04-27 13:25:52 +00:00
docs(api): clarify cross-channel message delivery
This commit is contained in:
parent
ac714803f6
commit
85c7996766
13
README.md
13
README.md
@ -1858,6 +1858,19 @@ By default, the API binds to `127.0.0.1:8900`. You can change this in `config.js
|
|||||||
- Single-message input: each request must contain exactly one `user` message
|
- Single-message input: each request must contain exactly one `user` message
|
||||||
- Fixed model: omit `model`, or pass the same model shown by `/v1/models`
|
- Fixed model: omit `model`, or pass the same model shown by `/v1/models`
|
||||||
- No streaming: `stream=true` is not supported
|
- No streaming: `stream=true` is not supported
|
||||||
|
- API requests run in the synthetic `api` channel, so the `message` tool does **not** automatically deliver to Telegram/Discord/etc. To proactively send to another chat, call `message` with an explicit `channel` and `chat_id` for an enabled channel.
|
||||||
|
|
||||||
|
Example tool call for cross-channel delivery from an API session:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"content": "Build finished successfully.",
|
||||||
|
"channel": "telegram",
|
||||||
|
"chat_id": "123456789"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
If `channel` points to a channel that is not enabled in your config, nanobot will queue the outbound event but no platform delivery will occur.
|
||||||
|
|
||||||
### Endpoints
|
### Endpoints
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user