Assistant file search text retrieval

@mambozzo For some reason, I don’t see a content property in the results array attoolCallStep.step_details.tool_calls[0].file_search.results .

When I console.log this, here’s what I see in terminal:

Console log code:

                const run = await openai.beta.threads.runs.steps.list(
                  threadId,
                  event.run_id
                )
                // Find the step with tool_calls
                const toolCallStep = run.data.find(
                  (step) => step.type === 'tool_calls'
                )
                console.log(
                  'toolCallStep: ',
                  toolCallStep.step_details.tool_calls[0].file_search.results
                )

Produces this in server terminal:

toolCallStep:  [
>    {
>      file_id: 'file-Jfe89GL6LGMGULww2kA2CW',
>      file_name: 'Aerobic high-intensity intervals are superior to improve V̇O2max compared with sprint intervals in well-trainned men.pdf',
>      score: 0.8963497064836998
>    },
>    {
>      file_id: 'file-Jfe89GL6LGMGULww2kA2CW',
>      file_name: 'Aerobic high-intensity intervals are superior to improve V̇O2max compared with sprint intervals in well-trainned men.pdf',
>      score: 0.895239367268356
},
    // ... and so on

Shouldn’t I be seeing a content property that contains the extracted file content? I also could not find this property in the API documentation. Thanks for any help!!

I was really hoping we’d get a file search update along with all the other releases this month :frowning:

1 Like

Did we not get any updates for it? I wasn’t able to keep up with the updates and so wasn’t sure if there was anything new with file_search.

SO, anyone know why I’m not seeing the content property in the results array? Wondering if it’s just me…

Hi @nickm ,

please send the full payload returned by the API, it might help troubleshoot your issue :slight_smile:

You can do it with postman or another similar application.

Thanks