Skip to content

Commit 4de0497

Browse files
committed
add comments
1 parent 47e9c08 commit 4de0497

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

test/contract-tests/images/applications/TestSimpleApp.AWSSDK.Core/BedrockTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public GetGuardrailResponse GetGuardrailResponse()
3939
};
4040
}
4141

42+
// 6 InvokeModel test calls and responses, one for each supported model
43+
// The manual responses are automatically serialized to a MemoryStream and used as the response body
44+
4245
public void InvokeModelAmazonTitan()
4346
{
4447
bedrockRuntime.InvokeModelAsync(new InvokeModelRequest

test/contract-tests/images/applications/TestSimpleApp.AWSSDK.Core/Program.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@
172172
// Reroute the Bedrock API calls to our mock responses in BedrockTests. While other services use localstack to handle the requests,
173173
// we write our own responses with the necessary data to mimic the expected behavior of the Bedrock services.
174174
app.MapGet("guardrails/test-guardrail", (BedrockTests bedrock) => bedrock.GetGuardrailResponse());
175+
// For invoke model, we have one test case for each of the 6 suppported models.
175176
app.MapPost("model/amazon.titan-text-express-v1/invoke", (BedrockTests bedrock) => bedrock.InvokeModelAmazonTitanResponse());
176177
app.MapPost("model/anthropic.claude-v2:1/invoke", (BedrockTests bedrock) => bedrock.InvokeModelAnthropicClaudeResponse());
177178
app.MapPost("model/meta.llama3-8b-instruct-v1:0/invoke", (BedrockTests bedrock) => bedrock.InvokeModelMetaLlamaResponse());

0 commit comments

Comments
 (0)