You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/overview/categories/configuration.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,6 +55,7 @@ categories:
55
55
- **Type**: String
56
56
- **Description**: Category-specific system prompt automatically injected into requests
57
57
- **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
58
59
- **Example**: `"You are a mathematics expert. Provide step-by-step solutions."`
59
60
60
61
```yaml
@@ -63,6 +64,23 @@ categories:
63
64
system_prompt: "You are a mathematics expert. Provide step-by-step solutions, show your work clearly, and explain mathematical concepts in an understandable way."
64
65
```
65
66
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 \
0 commit comments