Routing Studio
列出預設模板
路由工作室空狀態提供的只讀藍圖。
GET
/
api
/
v1
/
routing-preferences
/
presets
列出預設模板
curl --request GET \
--url https://api.example.com/api/v1/routing-preferences/presetsimport requests
url = "https://api.example.com/api/v1/routing-preferences/presets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/routing-preferences/presets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/routing-preferences/presets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/routing-preferences/presets"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/routing-preferences/presets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/routing-preferences/presets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body返回路由工作室在空狀態下提供的精心策劃的預設模板,可作為起始規則集使用。預設是隻讀的——應用某個預設本質上就是一次普通的創建偏好設置調用,只是用該預設的
rules、examples 和 confidence_floor_overrides 作為種子數據。
身份驗證
需要攜帶具有billing API 密鑰作用域的 Bearer 令牌。
請求示例
curl https://www.hitheo.ai/api/v1/routing-preferences/presets \
-H "Authorization: Bearer $THEO_API_KEY"
// Use the raw HTTP client for now — preset listing is exposed at the
// REST surface and is typically consumed by the dashboard empty state.
const res = await fetch("https://www.hitheo.ai/api/v1/routing-preferences/presets", {
headers: { Authorization: `Bearer ${process.env.THEO_API_KEY}` },
});
const { presets } = await res.json();
響應
每個預設都包含id、name、tagline、description、rules、examples 和 confidence_floor_overrides。
{
"presets": [
{
"id": "pricing-questions",
"name": "Pricing questions",
"tagline": "Route pricing questions to the analytical engine.",
"description": "Catches pricing-related keywords (pricing, cost, quote, plan, tier) and promotes to `think`.",
"rules": [
{
"pattern": "\\b(price|pricing|cost|quote|tier|plan)\\b",
"target_mode": "think",
"confidence": 0.88,
"description": "Pricing questions get the analytical engine."
}
],
"examples": [
{ "prompt": "What's the price of the enterprise plan?", "expected_mode": "think" }
],
"confidence_floor_overrides": {}
}
]
}
這個頁面有幫助嗎?
列出預設模板
curl --request GET \
--url https://api.example.com/api/v1/routing-preferences/presetsimport requests
url = "https://api.example.com/api/v1/routing-preferences/presets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/routing-preferences/presets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/routing-preferences/presets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/routing-preferences/presets"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/routing-preferences/presets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/routing-preferences/presets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body