Hi OpenAI Community,
I’ve uploaded files to a vector store using the OpenAI UI and integrated them with an assistant configured for file search. The assistant works fine, and annotations are included in the responses, but I’m unable to map the source_id
in the annotations to the corresponding file names.
Example Problem:
Here’s an example of the annotations I’m receiving:
"annotations": [
{
"source_id": "8:3",
"file_name": "Unknown",
"quote": ""
}
]
I’ve tried:
- Fetching file metadata using
/v1/files
, which returnsfile_id
andfilename
, but there’s no clear link betweensource_id
(e.g.,8:3
) andfile_id
. - Checking the annotation structure, but
source_id
doesn’t seem to directly match the uploaded file data.
Goal:
I’d like to resolve the source_id
to the file names (e.g., PricingPlansSummary.md
) to enrich my logs like this:
"annotations": [
{
"source_id": "8:3",
"file_name": "PricingPlansSummary.md",
"quote": "Unlimited scalability"
}
]
Questions:
- How can I map
source_id
to file names for uploaded vector store files? - Is there a specific endpoint or process I should use to retrieve this mapping?
Any help would be greatly appreciated!
Thanks in advance!