Reference
File System

File System

This file system object provides methods that allow users to create and access files. The file system object is accessible via the fs variable.

Example use of fs.writeFile
async function extractInfoFromImageToFile() {
  let text = await ai.vision.describe(ctx.args.prompt + ". Return ONLY the required info, no description, no additional notes", ctx.args.url);
  const file = await fs.writeFile("file.csv", text);
  return file;
}
 
extractInfoFromImageToFile().catch(console.log);
⚠️

This is available only to ENTERPRISE and PARTNERSHIP users

Properties

writeFile(path: string, data: string)

This method writes the supplied text data into a file located at the specified path.


© 2024 ProteusAI. All rights reserved