404 error calling OpenAI assistant with variable number of file IDs

I’m experiencing the same problem as discussed within this post but the solution isn’t working for me.

Updated with screenshots

I have a local data store containing records with a File ID of each file. I perform a search on the datastore and this retrieves the relevant records I require.

I then use an Array aggregator to populate the records into an array.

As described in the original post, I then call out to OpenAR with the File ID’s mapped as follows:
{{ifempty(map(73.array; “data.ID”))}}{{null}}

This always returns 404 Files were not found from OpenAI. I’ve verified the file ID’s are correct and it works if I pass one file id at a time.

Looking at the input bundle it looks as follows:

[
{
“role”: “user”,
“tools”: [
“retrieval”
],
“fileIds”: [
“file-removed, file-removed, file-removed, file-removed, file-removed, file-removed, file-removed”
],
“message”: “Files for content are attached.”,
“threadId”: “removed”,
“assistantId”: “removed”
}
]

Is it expecting the fieldIds to be formatted as follows with the extra "'s?

    "fileIds": [
        "file-removed", "file-removed", "file-removed", "file-removed", "file-removed", "file-removed", "file-removed"
    ],


input-bundle.txt (475 Bytes)
bundle.json (14 Bytes)

Any help gratefully received.

Welcome to the Make community!

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Input/Output bundles

Please provide the input and output bundles of the modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.
Screenshot_2023-10-06_141025

A.

Save each bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading them here will look like this:

module-1-input-bundle.txt (12.3 KB)
module-1-output-bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the input/output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

2 Likes

Thank you Sam, I’ve updated the post with screenshots and the bundles.

It’s unclear what’s coming out of the data store and what you are iterating.

You should be doing either one or the other.

What about the Scenario blueprint?

2 Likes