Skip to content

Commit 96c101f

Browse files
committed
Set up promptVersion directly in Lambda environment variables
1 parent b54a08e commit 96c101f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

packages/cdk/resources/Functions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {TableV2} from "aws-cdk-lib/aws-dynamodb"
99
const RAG_MODEL_ID = "anthropic.claude-3-sonnet-20240229-v1:0"
1010
// Claude model for query reformulation
1111
const QUERY_REFORMULATION_MODEL_ID = "anthropic.claude-3-haiku-20240307-v1:0"
12+
const QUERY_REFORMULATION_PROMPT_VERSION = "DRAFT"
1213
const BEDROCK_KB_DATA_SOURCE = "eps-assist-kb-ds"
1314
const LAMBDA_MEMORY_SIZE = "265"
1415

@@ -34,7 +35,6 @@ export interface FunctionsProps {
3435
readonly slackBotSigningSecret: Secret
3536
readonly slackBotStateTable: TableV2
3637
readonly promptName: string
37-
readonly promptVersion: string
3838
}
3939

4040
export class Functions extends Construct {
@@ -76,7 +76,7 @@ export class Functions extends Construct {
7676
"GUARD_RAIL_VERSION": props.guardrailVersion,
7777
"SLACK_BOT_STATE_TABLE": props.slackBotStateTable.tableName,
7878
"QUERY_REFORMULATION_PROMPT_NAME": props.promptName,
79-
"QUERY_REFORMULATION_PROMPT_VERSION": props.promptVersion
79+
"QUERY_REFORMULATION_PROMPT_VERSION": QUERY_REFORMULATION_PROMPT_VERSION
8080
}
8181
})
8282

packages/cdk/stacks/EpsAssistMeStack.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ export class EpsAssistMeStack extends Stack {
130130
slackBotTokenSecret: secrets.slackBotTokenSecret,
131131
slackBotSigningSecret: secrets.slackBotSigningSecret,
132132
slackBotStateTable: tables.slackBotStateTable.table,
133-
promptName: bedrockPrompts.queryReformulationPrompt.promptName,
134-
promptVersion: bedrockPrompts.queryReformulationPrompt.promptVersion
133+
promptName: bedrockPrompts.queryReformulationPrompt.promptName
135134
})
136135

137136
// Create vector index after Functions are created

0 commit comments

Comments
 (0)