k
@User
v
@Kira I'm sorry to hear that you're experiencing issues with uploading text files. A 400 Status Code error typically indicates a bad request, which could be due to various reasons such as incorrect API usage or missing parameters. To assist you better, could you please provide me with more details about how you're trying to upload the files? Are you using a specific API endpoint or method? Any additional information would be helpful to resolve this issue.
You can continue this conversation by mentioning me in the message.
k
This is how i am simply calling it and still its giving me an error : import { VapiClient } from "@vapi-ai/server-sdk"; import * as fs from "fs"; const client = new VapiClient({ token: 'OUR-VAPI-TOKEN' }); const fileStream = fs.createReadStream("C:/Users/moham/Documents/GitHub/KOKOnexusNew/backend/src/services/trial.txt", { encoding: 'utf8' }); (fileStream as any).contentType = 'text/plain'; client.files.create(fileStream);
s
Hey @Kira currently we are working on KB migration because of this you will observer inconsistent behaviour. So, I suggest to wait till end of this week to use files and KB features. Do let me know if you have more questions.
2 Views