File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
test/contract-tests/images/applications/TestSimpleApp.AWSSDK.Core Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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.
174174app . MapGet ( "guardrails/test-guardrail" , ( BedrockTests bedrock ) => bedrock . GetGuardrailResponse ( ) ) ;
175+ // For invoke model, we have one test case for each of the 6 suppported models.
175176app . MapPost ( "model/amazon.titan-text-express-v1/invoke" , ( BedrockTests bedrock ) => bedrock . InvokeModelAmazonTitanResponse ( ) ) ;
176177app . MapPost ( "model/anthropic.claude-v2:1/invoke" , ( BedrockTests bedrock ) => bedrock . InvokeModelAnthropicClaudeResponse ( ) ) ;
177178app . MapPost ( "model/meta.llama3-8b-instruct-v1:0/invoke" , ( BedrockTests bedrock ) => bedrock . InvokeModelMetaLlamaResponse ( ) ) ;
You can’t perform that action at this time.
0 commit comments