Reformulate an extraction query
curl --request POST \
--url https://api.lighton.ai/api/v2/query/reformulation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"model": "<string>"
}
'import requests
url = "https://api.lighton.ai/api/v2/query/reformulation"
payload = {
"query": "<string>",
"model": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', model: '<string>'})
};
fetch('https://api.lighton.ai/api/v2/query/reformulation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"query": "<string>",
"reformulation": "<string>"
}
]Files Search
Reformulate an extraction query
deprecated
Deprecated — this endpoint will be removed in a future release.
This endpoint can be used to reformulate a query in order to enhance retrieval.
The query should be a single string or a list of string with up to 10 queries.
The model field should be the name of the model to use for query formulation.
POST
/
api
/
v2
/
query
/
reformulation
Reformulate an extraction query
curl --request POST \
--url https://api.lighton.ai/api/v2/query/reformulation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"model": "<string>"
}
'import requests
url = "https://api.lighton.ai/api/v2/query/reformulation"
payload = {
"query": "<string>",
"model": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', model: '<string>'})
};
fetch('https://api.lighton.ai/api/v2/query/reformulation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"query": "<string>",
"reformulation": "<string>"
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Request serializer for reformulating queries to enhance retrieval.