Get suggestions
curl --request POST \
--url https://api.webless.ai/api/v1/suggestions \
--header 'Content-Type: application/json' \
--data '
{
"sessionId": "a1c2d3e4-1111-2222-3333-444455556666"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({sessionId: 'a1c2d3e4-1111-2222-3333-444455556666'})
};
fetch('https://api.webless.ai/api/v1/suggestions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webless.ai/api/v1/suggestions"
payload = { "sessionId": "a1c2d3e4-1111-2222-3333-444455556666" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"suggestions": [
"<string>"
]
}{
"detail": [
{}
]
}Search API
Get suggestions
Returns follow-up suggestions related to the current query and recent session context.
POST
/
api
/
v1
/
suggestions
Get suggestions
curl --request POST \
--url https://api.webless.ai/api/v1/suggestions \
--header 'Content-Type: application/json' \
--data '
{
"sessionId": "a1c2d3e4-1111-2222-3333-444455556666"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({sessionId: 'a1c2d3e4-1111-2222-3333-444455556666'})
};
fetch('https://api.webless.ai/api/v1/suggestions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.webless.ai/api/v1/suggestions"
payload = { "sessionId": "a1c2d3e4-1111-2222-3333-444455556666" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"suggestions": [
"<string>"
]
}{
"detail": [
{}
]
}Pass
previous_suggestions when you want to avoid repeating prompts already
shown to the user.Body
application/json
Example:
"a1c2d3e4-1111-2222-3333-444455556666"
Example:
"YOUR_COMPANY"
Runtime package pointer. Omit this field or use published for production traffic. Use unpublished only when testing an unpublished runtime package.
Available options:
published, unpublished Number of suggestions to generate.
Example:
3
Example:
["How does Webless work?"]
Current query context.
Example:
"What does Webless do?"
Example:
"1f7c5f74-7b9e-4a0a-9b7d-4e3e2a5e3b60"
Response
Suggested follow-up prompts
Was this page helpful?