Skip to content

Commit

Permalink
make prompt dict static
Browse files Browse the repository at this point in the history
Signed-off-by: Heng Qian <[email protected]>
  • Loading branch information
qianheng-aws committed Jul 29, 2024
1 parent 1b8e376 commit 1935526
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ public class CreateAlertTool implements Tool {
private static final String MODEL_ID = "model_id";
private static final String PROMPT_FILE_PATH = "CreateAlertDefaultPrompt.json";
private static final String DEFAULT_QUESTION = "Create an alert as your recommendation based on the context";
private static final Map<String, String> promptDict = ToolHelper.loadDefaultPromptDictFromFile(CreateAlertTool.class, PROMPT_FILE_PATH);

public CreateAlertTool(Client client, String modelId, String modelType) {
this.client = client;
this.modelId = modelId;
Map<String, String> promptDict = ToolHelper.loadDefaultPromptDictFromFile(this.getClass(), PROMPT_FILE_PATH);
if (!promptDict.containsKey(modelType)) {
throw new IllegalArgumentException(
LoggerMessageFormat
Expand Down

0 comments on commit 1935526

Please sign in to comment.