Wie sonst kann antex.chat aufgerufen werden?
1: JavaScript / node.js / typescript
async function query(data) {
const response = await fetch(
"http://proxy01.antex.chat/<Chat-ID>",
{
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(data)
}
);
const result = await response.json();
return result;
}
query({"question": "Hey, how are you?"}).then((response) => {
console.log(response);
});
2. curl
curl https://proxy01.antex.chat/<Chat-ID> \
-X POST -H "Content-Type: application/json" \
-d '{"question": "Wie erreiche ich Sie?"}'
3. python
import requests
API_URL = "https://proxy01.antex.chat/<Chat-ID>"
def query(payload):
response = requests.post(API_URL, json=payload)
return response.json()
output = query({
"question": "Hey, how are you?",
})