When using the search endpoint to rank documents, is it possible to get the line / metadata of the document as a response? Currently, it seems the endpoint only returns the documents text.
E.g. my .jsonl doc is
{"text": "puppy B is sad", "metadata": "emotional state of puppy B"}
{"text": "puppy A is happy", "metadata": "emotional state of puppy A"}
My query
out = openai.Engine("ada").search(
search_model="ada",
query="happy",
max_rerank=5,
file="file-7WiGxRnhUXt7fSM28kwNBGGX"
)
The result
{
"object": "list",
"data": [
{
"object": "search_result",
"document": 0,
"score": 584.489,
"text": "puppy A is happy"
}
],
"model": "ada:2020-05-03"
}
I want the line “1” or the metadata “emotional state of puppy A” in my result. Is it possible or do I need to search for the matching text in my entire corpus to retrieve the metadata?