Error in uploading file to OpenAI Assistant

Su Myat Hlaing 50 Reputation points
2024-03-07T05:15:12.29+00:00

When I upload file for OpenAI Assistant, below error occur. Please help to solve.

const filename = "./Uploads/data.txt";
  const uint8array = new TextEncoder().encode("The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457.");
  const uploadAssistantFile = await assistantsClient.uploadFile(uint8array, "assistants", { filename });

throw er; // Unhandled 'error' event ^ Error [ERR_STREAM_PUSH_AFTER_EOF]: stream.push() after EOF at new NodeError (node:internal/errors:393:5) at readableAddChunk (node:internal/streams/readable:285:30) at Readable.push (node:internal/streams/readable:234:10) at node:internal/webstreams/adapters:496:22 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Emitted 'error' event on Readable instance at: at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { code: 'ERR_STREAM_PUSH_AFTER_EOF' }

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,162 questions
{count} votes