aws-doc-sdk-examples icon indicating copy to clipboard operation
aws-doc-sdk-examples copied to clipboard

[Enhancement]: Swift Bedrock code examples

Open sebsto opened this issue 8 months ago • 2 comments

Background story

I'm a Developer Advocate, working with @DennisTraub and mentoring a student @monadierickx that currently works building a swift code library, on top of the AWS SDK for Swift to make it easier for Swift developers to use the Bedrock API.

Based on this work, we will submit Swift SDK code samples to be added to the documentation.

Here is our priority / list of samples

  • InvokeModel and InvokeModelWithResonseStream API for recent version of Claude (3.7 Sonnet) and Nova (Canvas and Reel) . Text and Image modality
  • Converse and ConverseStream API with text and image. (same model)

Questions

  • is there other API that should be top priority ?
  • is there other model that should be stop priority

What does this example accomplish?

Demonstrate how to use latest generation model for text and image generation, using either the InvokeModel or the Converse API

Which AWS service(s)?

Amazon Bedrock

Which AWS SDKs or tools?

  • [ ] All languages
  • [ ] .NET
  • [ ] C++
  • [ ] Go (v2)
  • [ ] Java
  • [ ] Java (v2)
  • [ ] JavaScript
  • [ ] JavaScript (v3)
  • [ ] Kotlin
  • [ ] PHP
  • [ ] Python
  • [ ] Ruby
  • [ ] Rust
  • [x] Swift
  • [ ] Not applicable

Are there existing code examples to leverage?

We're working on a small library that would make easier for developers to use Bedrock models in Swift.

The proposed code sample for the doc will be based on the raw AWS SDK Swift constructs provided. https://github.com/build-on-aws/swift-fm-playground

Do you have any reference code?


sebsto avatar Mar 31 '25 11:03 sebsto

Welcome! I'm happy to help with the submissions.

DennisTraub avatar Mar 31 '25 11:03 DennisTraub

Also waiting for the InvokeModelWithBidirectionalStream example to use Nova Sonic.

zhu-xiaowei avatar Apr 11 '25 08:04 zhu-xiaowei