Skip to content

Kotlin: Add Bedrock Runtime invoke model example #7221

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

Merged
merged 3 commits into from
Feb 20, 2025

Conversation

amasotti
Copy link
Contributor

@amasotti amasotti commented Feb 2, 2025

This pull request adds a new code example demonstrating how to use the AWS SDK for Kotlin (v1.4.11) to invoke foundation models through Amazon Bedrock Runtime. The changes include:

  • Add InvokeModel example showing how to generate text using Titan Text model
  • Update README.md with Bedrock Runtime documentation references

The example includes:

  • Set up the Bedrock Runtime client
  • Structure model invocation requests
  • Handle model responses using Kotlin serialization
  • Process generated text output and print it to stdout

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the Kotlin This issue relates to the AWS SDK for Kotlin label Feb 2, 2025
@scmacdon scmacdon self-requested a review February 19, 2025 17:32
@scmacdon scmacdon added On Call Review complete On call review complete Task A general update to the code base for language clarification, missing actions, tests, etc. labels Feb 19, 2025
@scmacdon scmacdon force-pushed the kotlin-bedrock-runtime-example branch from b8875ca to d699982 Compare February 19, 2025 20:11
@scmacdon
Copy link
Contributor

scmacdon commented Feb 19, 2025

This PR has been approved and tested. It all looks good. The only thing is to update the Readme following the instructions here:

https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/.tools/readmes

That will resolve the check that is not passing and we can merge this PR.

@scmacdon scmacdon force-pushed the kotlin-bedrock-runtime-example branch from 5956a18 to 8407f00 Compare February 20, 2025 19:28
@scmacdon scmacdon merged commit ae2207e into awsdocs:main Feb 20, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Kotlin This issue relates to the AWS SDK for Kotlin On Call Review complete On call review complete Task A general update to the code base for language clarification, missing actions, tests, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants