-
Notifications
You must be signed in to change notification settings - Fork 2
Merge repos swift fm playgroung and swift bedrock library #12
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
Conversation
There was a problem hiding this 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)")
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.