Skip to content

Conversation

@sebsto
Copy link
Collaborator

@sebsto sebsto commented May 25, 2025

Merge the Swift-FM-Playgroung repo (this repo) with the Swift Bedrock Library.

This creates a mono repo containing both the Bedrock Library and the web playground demo app.
I iunderstand this is less than optimal as the Swift Package Manager is designed to work on individual repos.

@sebsto sebsto self-assigned this May 25, 2025
@sebsto sebsto requested a review from Copilot May 25, 2025 11:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR merges the Swift-FM-Playgroung repo with the Swift Bedrock Library to create a mono repo that contains both the Bedrock Library and a web playground demo app. Key changes include the addition of comprehensive model invocation and conversation endpoints (for both text and image modalities), new parameter validation utilities, and updates to project configuration (e.g. Package.swift, Makefile, CI workflows).

Reviewed Changes

Copilot reviewed 188 out of 188 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
swift-bedrock-library/Sources/BedrockService/InvokeModel/InvokeModelResponse.swift Adds response handling for text completions and image generations with dual initializers.
swift-bedrock-library/Sources/BedrockService/InvokeModel/InvokeModelRequest.swift Introduces new request constructors for text, text-to-image, and image variation scenarios.
swift-bedrock-library/Sources/BedrockService/InvokeModel/BedrockService+InvokeModelText.swift Implements text generation endpoint with error handling and logging.
swift-bedrock-library/Sources/BedrockService/InvokeModel/InvokeModelService+InvokeModelImage.swift Provides image generation endpoints along with parameter validation.
swift-bedrock-library/Sources/BedrockService/InvokeModel/BedrockService+ImageParameterValidation.swift Adds utilities to validate image parameters for generation and variation.
swift-bedrock-library/Sources/BedrockService/Converse/*.swift Introduces streaming and non-streaming conversation endpoints with request builders.
swift-bedrock-library/Sources/BedrockService/BedrockService.swift Implements client initialization and common operations to interact with Amazon Bedrock.
swift-bedrock-library/Sources/BedrockService/BedrockAuthentication*.swift Establishes multiple AWS authentication mechanisms including SSO and web identity.
Makefile, README.md, Package.swift, CI workflows, etc. Update project configuration and documentation to support the merged mono repo structure.
Comments suppressed due to low confidence (1)

swift-bedrock-library/Sources/BedrockService/InvokeModel/InvokeModelResponse.swift:104

  • In the getGeneratedImage() function, the error message mentions 'completion' instead of 'generated image'; update the message to clarify that the error pertains to image generation.
throw BedrockServiceError.decodingError("Something went wrong while decoding the request body to find the completion: \(error)")

@sebsto sebsto merged commit df7df1f into main May 25, 2025
@sebsto sebsto deleted the merge_repos branch May 25, 2025 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant