Skip to content

Commit c4c3f82

Browse files
committed
update doc
Signed-off-by: Huamin Chen <[email protected]>
1 parent a3d9588 commit c4c3f82

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

website/docs/overview/categories/configuration.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ categories:
5555
- **Type**: String
5656
- **Description**: Category-specific system prompt automatically injected into requests
5757
- **Behavior**: Replaces existing system messages or adds new one at the beginning
58+
- **Runtime Control**: Can be enabled/disabled via API when `--enable-system-prompt-api` flag is used
5859
- **Example**: `"You are a mathematics expert. Provide step-by-step solutions."`
5960

6061
```yaml
@@ -63,6 +64,23 @@ categories:
6364
system_prompt: "You are a mathematics expert. Provide step-by-step solutions, show your work clearly, and explain mathematical concepts in an understandable way."
6465
```
6566

67+
**Runtime Management**: System prompts can be dynamically controlled via REST API endpoints when the server is started with `--enable-system-prompt-api` flag:
68+
69+
```bash
70+
# Start server with system prompt API enabled
71+
./semantic-router --enable-system-prompt-api
72+
73+
# Toggle system prompt for specific category
74+
curl -X PUT http://localhost:8080/config/system-prompts \
75+
-H "Content-Type: application/json" \
76+
-d '{"category": "math", "enabled": false}'
77+
78+
# Set injection mode (replace/insert)
79+
curl -X PUT http://localhost:8080/config/system-prompts \
80+
-H "Content-Type: application/json" \
81+
-d '{"category": "math", "mode": "insert"}'
82+
```
83+
6684
### Reasoning Configuration
6785

6886
#### `use_reasoning` (Required)

0 commit comments

Comments
 (0)