Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go v2 Add Bedrock Runtime Titan Text example #6189

Merged
merged 13 commits into from Apr 24, 2024
8 changes: 8 additions & 0 deletions .doc_gen/metadata/bedrock-runtime_metadata.yaml
Expand Up @@ -100,6 +100,14 @@ bedrock-runtime_InvokeAmazonTitanForTextGeneration:
- description: Asynchronously invoke the Amazon Titan Text G1 foundation model to generate text.
snippet_tags:
- BedrockRuntime.dotnetv3.BedrockRuntimeActions.InvokeModelAsync.TitanTextG1
Go:
versions:
- sdk_version: 2
github: gov2/bedrock-runtime
excerpts:
- description: Invoke the Amazon Titan Text G1 foundation model to generate text.
snippet_tags:
- gov2.bedrock-runtime.InvokeTitanText
services:
bedrock-runtime: {InvokeModel}

Expand Down
9 changes: 5 additions & 4 deletions gov2/bedrock-runtime/README.md
Expand Up @@ -27,7 +27,6 @@ For prerequisites, see the [README](../README.md#Prerequisites) in the `gov2` fo


<!--custom.prerequisites.start-->
> ⚠ You must request access to a model before you can use it. If you try to use the model (with the API or console) before you have requested access to it, you will receive an error message. For more information, see [Model access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html).
Laren-AWS marked this conversation as resolved.
Show resolved Hide resolved
<!--custom.prerequisites.end-->

### Get started
Expand All @@ -43,14 +42,16 @@ functions within the same service.

### Invoke model examples

- [AI21 Labs Jurassic-2: Text generation](actions/invoke_model.go#L78)
- [Amazon Titan: Image generation](actions/invoke_model.go#L178)
- [AI21 Labs Jurassic-2: Text generation](actions/invoke_model.go#L83)
- [Amazon Titan: Image generation](actions/invoke_model.go#L191)
- [Amazon Titan: Text generation](actions/invoke_model.go#L261)
- [Anthropic Claude 2: Real-time response stream processing](actions/invoke_model_with_response_stream.go#L30)
- [Anthropic Claude 2: Text generation](actions/invoke_model.go#L27)
- [Meta Llama 2: Text generation](actions/invoke_model.go#L130)
- [Meta Llama 2: Text generation](actions/invoke_model.go#L140)


<!--custom.examples.start-->
> ⚠ You must request access to a model before you can use it. If you try to use the model (with the API or console) before you have requested access to it, you will receive an error message. For more information, see [Model access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html).
<!--custom.examples.end-->

## Run the examples
Expand Down