Search…
Q&A API
How to answer natural language questions.

Answer question

post
https://example.forefront.link
/answer
Answer question

Example request

cURL
Python
1
curl https://DEPLOYMENT_NAME-TEAM_SLUG.forefront.link \
2
-H 'Content-Type: application/json' \
3
-H 'Authorization: Bearer YOUR_API_KEY' \
4
-d '{
5
"documents": ["the cat ate the catnip", "the rabbit ate the carrot", "the horse ate the hay"],
6
"query": "What did the rabbit eat?"
7
}'
Copied!
1
import requests
2
3
headers = {"Authorization": "Bearer <INSERT_YOUR_TOKEN>"}
4
5
data = {
6
"documents": ["the cat ate the catnip", "the rabbit ate the carrot", "the horse ate the hay"],
7
"query": "What did the rabbit eat?"
8
}
9
10
res = requests.post(
11
"https://vanilla-gpt-j-forefront.forefront.link",
12
json=data,
13
headers=headers
14
)
Copied!

Retrieve API Key

Last modified 1mo ago