LLM API
Requires JWT with access_level: ENCHANTER.
Read LLM Config
- Endpoint:
/api/{{ API_VERSION }}/llm_config/ - Function: Read LLM YAML configuration.
- Method:
GET - Shell Command:
curl -L "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/llm_config/" \
-H "Authorization: Bearer <token>"
- Python Command:
import requests
url = "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/llm_config/"
headers = {"Authorization": "Bearer <token>"}
resp = requests.get(url, headers=headers)
print(resp.json())
Modify LLM Config
- Endpoint:
/api/{{ API_VERSION }}/llm_config/ - Function: Modify one key in the LLM YAML.
- Method:
PATCH - Shell Command:
curl -X PATCH "http://<ROBOT_IP>:8000/api/{{ API_VERSION }}/llm_config/" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"command":"max_tokens","value":512}'
- Python Command: