According to the documentation available here: https://platform.openai.com/docs/assistants/tools/file-search, it is possible to retrieve and inspect the file-search chunks that were used by the Assistants API by using the include parameter when retrieving the appropriate run step:
run_step = client.beta.threads.runs.steps.retrieve(
thread_id="thread_abc123",
run_id="run_abc123",
step_id="step_abc123",
include=["step_details.tool_calls[*].file_search.results[*].content"]
)
However, I am not returning anything extra informaiton when using include
. I have checked every run step for the the run, and I know that there are at least 15k tokens worth of context that were used in the last thread I tested this with (not to mention that numerous FileCitations included in the Assistant’s response).
Has anyone actually seen this work? I can’t find any examples on the web of what the response should even look like.
If it is working for other people, is there anyone who is using AzureOpenAI who has this working properly? I know they don’t necessarily always maintain feature parity with OpenAI directly.