Skip to content

Commit 8a47065

Browse files
committed
Adding updated Bedrock folders
1 parent 0bed1d5 commit 8a47065

File tree

69 files changed

+3513
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+3513
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.vs/
2+
/Tools/
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<PackageReference Include="AWSSDK.BedrockRuntime" Version="4.0.0-preview.4" />
12+
</ItemGroup>
13+
14+
</Project>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
namespace BedrockRuntimeActions
5+
{
6+
internal class HelloBedrockRuntime
7+
{
8+
private static readonly string CLAUDE = "anthropic.claude-v2";
9+
10+
static async Task Main(string[] args)
11+
{
12+
await TextToText();
13+
}
14+
15+
private static async Task TextToText()
16+
{
17+
string prompt = "In one sentence, what is a large-language model?";
18+
await Invoke(CLAUDE, prompt);
19+
}
20+
21+
private static async Task Invoke(string modelId, string prompt)
22+
{
23+
switch (modelId)
24+
{
25+
case var _ when modelId == CLAUDE:
26+
Console.WriteLine(await InvokeModelAsync.InvokeClaudeAsync(prompt));
27+
break;
28+
default:
29+
Console.WriteLine($"Unknown model ID: {modelId}. Valid model IDs are: {CLAUDE}.");
30+
break;
31+
};
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)