Skip to main content

add_file

codebolt.rag.add_file(filename: string, file_path: string): void
Adds a file to the CodeBolt File System.

Parameters

NameTypeDescription
filenamestringThe name of the file to add.
file_pathstringThe path where the file should be added.

Example

import codebolt from '@codebolt/codeboltjs';

async function exampleAddFile() {
await codebolt.rag.add_file("example.txt", "/path/to/file");
console.log("File added successfully.");
}

exampleAddFile();