curl -X POST https://huodouai.com/gov-api/api/gov/chat \
-H "Content-Type: application/json" \
-d '{
"message": "养老保险怎么交?",
"history": []
}'
import requests
def gov_chat(message):
resp = requests.post(
"https://huodouai.com/gov-api/api/gov/chat",
json={"message": message, "history": []}
)
return resp.json()
result = gov_chat("养老保险怎么交?")
print(result["reply"])
async function govChat(message) {
const resp = await fetch(
"https://huodouai.com/gov-api/api/gov/chat", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({message, history: []})
}
);
return resp.json();
}
govChat("养老保险怎么交?").then(console.log);