Cannot update a document to the OpenAI Assistant in version

I’m trying to update a document to OpenAI Assistant, it’s already uploaded in the previous node. But in this node, when I selected the document to update to, it shows the error below. I believe the node is missing a parameter for the vector store chosen to process the document.

{
“errorMessage”: “Bad request - please check your parameters”,
“errorDescription”: “Unknown parameter: ‘tool_resources.file_search.vector_stores’.”,
“errorDetails”: {
“rawErrorMessage”: [
“400 - {"error":{"message":"Unknown parameter: ‘tool_resources.file_search.vector_stores’.","type":"invalid_request_error","param":"tool_resources.file_search.vector_stores","code":"unknown_parameter"}}”
],
“httpCode”: “400”
},
“n8nDetails”: {
“nodeName”: “OpenAI3”,
“nodeType”: “@n8n/n8n-nodes-langchain.openAi”,
“nodeVersion”: 1.3,
“resource”: “assistant”,
“operation”: “update”,
“itemIndex”: 0,
“time”: “6/7/2024, 10:14:35 PM”,
“n8nVersion”: “1.44.1 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“NodeApiError: Bad request - please check your parameters”,
" at Object.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1266:19)“,
" at processTicksAndRejections (node:internal/process/task_queues:95:5)”,
" at Object.requestWithAuthentication (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/NodeExecuteFunctions.js:1991:20)“,
" at Object.apiRequest (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/vendors/OpenAi/transport/index.js:17:12)”,
" at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/vendors/OpenAi/actions/assistant/update.operation.js:173:22)“,
" at Object.router (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/vendors/OpenAi/actions/router.js:64:34)”,
" at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/@n8n/n8n-nodes-langchain/dist/nodes/vendors/OpenAi/OpenAi.node.js:16:16)“,
" at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:728:19)”,
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:664:51",
" at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1079:20"
]
}
}

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
  • n8n version: 1.44.1
  • Database (default: SQLite): Default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker via Easypanel
  • Operating system: Windows 10

@avatarwefa Welcome :wave:

Had a quick look and it does indeed look like a bug with the OpenAI node - "vector_stores" should be "vector_store_ids" according to the official docs.

If you have both assistant vector store ID and file ID, here’s an alternative workaround to upload your file to assistant’s vector store using the API (see last node!).

Hi @Jim_Le & @avatarwefa

thank you guys for posting here and pointing out this bug! :muscle:
We’ll create a ticket for it and will keep you posted once we’ve fixed & released it.

:clinking_glasses: Thanks!

1 Like