File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,7 @@ export class BedrockPromptSettings extends Construct {
6363 : { text : string ; filename : string } {
6464 // Read all files in the folder
6565 const files = fs
66- . readdirSync ( "../../../prompts" )
67- . filter ( f => f . startsWith ( `${ type } _v` ) && f . endsWith ( ".txt" ) )
66+ . readdirSync ( `${ process . cwd ( ) } /prompts` )
6867
6968 if ( files . length === 0 ) {
7069 throw new Error ( "No variant files found in the folder." )
@@ -76,7 +75,7 @@ export class BedrockPromptSettings extends Construct {
7675 throw new Error ( `No prompt file found for type: ${ type } ` )
7776 }
7877
79- const text = fs . readFileSync ( file , "utf-8" )
78+ const text = fs . readFileSync ( ` ${ process . cwd ( ) } /prompts/ ${ file } ` , "utf-8" )
8079
8180 return { text, filename : file }
8281 }
You can’t perform that action at this time.
0 commit comments