Skip to content

Commit 2bbe35b

Browse files
chore: remove stopSequence for chatgpt
1 parent e157504 commit 2bbe35b

File tree

2 files changed

+3
-20
lines changed

2 files changed

+3
-20
lines changed

packages/cdk/resources/BedrockPromptSettings.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ export class BedrockPromptSettings extends Construct {
3535
this.inferenceConfig = {
3636
temperature: 0,
3737
topP: 0.2,
38-
maxTokens: 1500,
39-
stopSequences: [
40-
"Human:"
41-
]
38+
maxTokens: 1500
4239
}
4340
}
4441

packages/slackBotFunction/app/services/bedrock.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,10 @@ def query_bedrock(user_query: str, session_id: str = None) -> RetrieveAndGenerat
4949
"guardrailId": config.GUARD_RAIL_ID,
5050
"guardrailVersion": config.GUARD_VERSION,
5151
},
52-
"inferenceConfig": {
53-
"textInferenceConfig": {
54-
**inference_config,
55-
"stopSequences": [
56-
"Human:",
57-
],
58-
}
59-
},
52+
"inferenceConfig": {"textInferenceConfig": inference_config},
6053
},
6154
"orchestrationConfiguration": {
62-
"inferenceConfig": {
63-
"textInferenceConfig": {
64-
**inference_config,
65-
"stopSequences": [
66-
"Human:",
67-
],
68-
}
69-
},
55+
"inferenceConfig": {"textInferenceConfig": inference_config},
7056
"promptTemplate": {
7157
"textPromptTemplate": """You are a question answering agent.
7258
I will provide you with a set of search results and a user's question,

0 commit comments

Comments
 (0)