add_file
codebolt.rag.add_file(filename: string, file_path: string): void
Adds a file to the CodeBolt File System.
Parameters
Name | Type | Description |
---|---|---|
filename | string | The name of the file to add. |
file_path | string | The 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();