File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,10 @@ export class BedrockPromptSettings extends Construct {
6161 */
6262 private getTypedPrompt ( type : BedrockPromptSettingsType )
6363 : { text : string ; filename : string } {
64- // Read all files in the folder
64+ // Read all files in the folder)
65+ const path = __dirname + "/../../../prompts"
6566 const files = fs
66- . readdirSync ( ` ${ process . cwd ( ) } /prompts` )
67+ . readdirSync ( path )
6768
6869 if ( files . length === 0 ) {
6970 throw new Error ( "No variant files found in the folder." )
@@ -75,7 +76,7 @@ export class BedrockPromptSettings extends Construct {
7576 throw new Error ( `No prompt file found for type: ${ type } ` )
7677 }
7778
78- const text = fs . readFileSync ( `${ process . cwd ( ) } /prompts /${ file } ` , "utf-8" )
79+ const text = fs . readFileSync ( `${ path } /${ file } ` , "utf-8" )
7980
8081 return { text, filename : file }
8182 }
You can’t perform that action at this time.
0 commit comments