1 · 多 task 共用 endpoint
POST /api/llm/generate { task, topic } → output(含引用標號)+ provider + latency_ms + hits
import requests
for task, topic in [
("publishing", "中元 普渡 七月"), # → A2 出版選題
("grant", "在地宗教文化盤點"), # → A3 文化部標案
]:
r = requests.post("https://lius.cc/api/llm/generate",
json={"task": task, "topic": topic}, timeout=60).json()
print(f"=== {task} {r['provider']} {r['latency_ms']}ms ===")
print(r['output'][:200], '...')2 · Provider fallback
Gemma 2.5 Flash → DeepSeek V4-Flash → OpenAI proxy (gpt-5.4-mini)