Answer Question
POST {{baseUrl}}/answers
Answers the specified question using the provided documents and examples.The endpoint first searches over provided documents or files to find relevant context. The relevant context is combined with the provided examples a
Request Body
{"model"=>"ipsum occaecat", "question"=>"What is the capital of Japan?", "examples"=>[["esse", "dolo"]], "examples_context"=>"Ottawa, Canada's capital, is located in the east of southern Ontario, near the city of Montréal and the U.S. border.", "documents"=>["est in mollit nisi elit", "consectetur exercitation quis cil"], "file"=>"ipsum esse minim Lorem", "search_model"=>"ada", "max_rerank"=>200, "temperature"=>0, "logprobs"=>nil, "max_tokens"=>16, "stop"=>"\n", "n"=>1, "logit_bias"=>nil, "return_metadata"=>false, "return_prompt"=>false, "user"=>"user-1234"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"object":"voluptate dolore aliquip ipsum","model":"Duis laborum","search_model":"dolor","completion":"minim aute fugiat","answers":["et qui","consequat nisi consectetur"],"selected_documents":[{"document":-31709807,"text":"dolor consectetur"},{"document":65300678,"text":"esse labore commodo"}]}