Unknown parameter: 'file_ids'

While creating the assistant using “file_ids” parameter in the body, facing Unknown parameter: ‘file_ids’ issue. Can you help on this ASAP.
Sample json used:

{
    "name":"Test",
    "instructions":"Test",
    "model":"gtp-xx",
    "tools":[{"type": "code_interpreter"}],
    "file_ids": ["assistat_id1","assistant_id2"]
  }

Hello,

You are using the old method I think. The body you have to send usually look like the example below. There is now file_ids parameter

  name: body.name,
  instructions: body.prompt,
  model: model.name,
  tools: [{ type: "file_search" }, { type: "code_interpreter" }],
  tool_resources: {
    ...bodyTools
  }

Thanks for your response.

Indeed, the official documentation does not mention a filed_ids key in the assistant object.

However, if you look at the GitHub repository for the Python module, you can see that there is an optional file_ids field within the ToolResourcesCodeInterpreter of the assistant object.

It seems that this is where the file IDs used by tools like the code interpreter are specified and then returned as part of the assistant object.

1 Like