Skip to content

Commit

Permalink
Merge pull request #3 from techthoughts2/Enhancements
Browse files Browse the repository at this point in the history
Enhancements - Jan 2025 update
  • Loading branch information
techthoughts2 authored Jan 5, 2025
2 parents 5f43721 + fc5e87b commit bb104df
Show file tree
Hide file tree
Showing 71 changed files with 5,386 additions and 383 deletions.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"powershell.codeFormatting.preset": "Stroustrup",
"cSpell.words": [
"Allman",
"apac",
"BDRR",
"Braunfels",
"Catesta",
Expand All @@ -45,6 +46,7 @@
"notlike",
"OTBS",
"outpainting",
"pwsh",
"shouldprocess",
"Starfleet",
"starships",
Expand Down
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Documentation for pwshBedrock is available at: [https://www.pwshbedrock.dev](htt
- PowerShell 5.1 or later
- AWS account with access to Amazon Bedrock
- AWS credentials with appropriate `bedrock:InvokeModel` permission
- You must [manage and add model acesss](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html) through one-time request model access action. *Note: this must be done for each model you plan to interact with.*
- You must [manage and add model access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html) through one-time request model access action. *Note: this must be done for each model you plan to interact with.*

### Installation

Expand Down Expand Up @@ -85,12 +85,12 @@ Invoke-AI21LabsJambaModel -Message 'Explain zero-point energy.' -ModelID 'ai21.j
#------------------------------------------------------------------------------------------------
```

##### Amazon Titan Image Generator G2 model
##### Amazon Image Generator

```powershell
#------------------------------------------------------------------------------------------------
# Generates an image and saves the image to the C:\temp folder.
Invoke-AmazonImageModel -ImagesSavePath 'C:\temp' -ImagePrompt 'Create a starship emerging from a nebula.' -ModelID 'amazon.titan-image-generator-v2:0' -Credential $awsCredential -Region 'us-west-2'
Invoke-AmazonImageModel -ImagesSavePath 'C:\temp' -ImagePrompt 'Create a starship emerging from a nebula.' -ModelID 'amazon.nova-canvas-v1:0' -Credential $awsCredential -Region 'us-east-1'
#------------------------------------------------------------------------------------------------
```

Expand All @@ -103,6 +103,15 @@ Invoke-AmazonTextModel -Message 'Explain zero-point energy.' -ModelID amazon.tit
#------------------------------------------------------------------------------------------------
```

##### Amazon Nova Text models

```powershell
#------------------------------------------------------------------------------------------------
# Sends a text message to the on-demand Amazon Nova model in the specified AWS region and returns the response.
Invoke-AmazonNovaTextModel -Message 'Explain zero-point energy.' -ModelID 'amazon.nova-pro-v1:0' -Credential $awsCredential -Region 'us-east-1'
#------------------------------------------------------------------------------------------------
```

##### Anthropic Models

```powershell
Expand Down Expand Up @@ -140,7 +149,7 @@ Invoke-CohereCommandRModel -Message 'Explain zero-point energy.' -ModelID 'coher
# Sends a text message to the on-demand Meta model in the specified AWS region and returns the response.
Invoke-MetaModel -Message 'Explain zero-point energy.' -ModelID 'meta.llama3-8b-instruct-v1:0' -Credential $awsCredential -Region 'us-west-2'
#------------------------------------------------------------------------------------------------
# Sending a media file to a Meta model and retriveing the response
# Sending a media file to a Meta model and retrieving the response
Invoke-MetaModel -ImagePrompt 'Describe this image in two sentences.' -ModelID 'meta.llama3-2-11b-instruct-v1:0' -MediaPath 'C:\path\to\image.jpg' -Credential $awsCredential -Region 'us-west-2'
#------------------------------------------------------------------------------------------------
```
Expand Down
8 changes: 4 additions & 4 deletions actions_bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ $modulesToInstall = New-Object System.Collections.Generic.List[object]
# https://github.com/nightroman/Invoke-Build
[void]$modulesToInstall.Add(([PSCustomObject]@{
ModuleName = 'InvokeBuild'
ModuleVersion = '5.11.3'
ModuleVersion = '5.12.1'
}))
# https://github.com/PowerShell/PSScriptAnalyzer
[void]$modulesToInstall.Add(([PSCustomObject]@{
ModuleName = 'PSScriptAnalyzer'
ModuleVersion = '1.22.0'
ModuleVersion = '1.23.0'
}))
# https://github.com/PowerShell/platyPS
# older version used due to: https://github.com/PowerShell/platyPS/issues/457
Expand All @@ -31,11 +31,11 @@ $modulesToInstall = New-Object System.Collections.Generic.List[object]
}))
[void]$modulesToInstall.Add(([PSCustomObject]@{
ModuleName = 'AWS.Tools.Common'
ModuleVersion = '4.1.700'
ModuleVersion = '4.1.729'
}))
[void]$modulesToInstall.Add(([PSCustomObject]@{
ModuleName = 'AWS.Tools.BedrockRuntime'
ModuleVersion = '4.1.700'
ModuleVersion = '4.1.729'
}))
[void]$modulesToInstall.Add(([PSCustomObject]@{
ModuleName = 'Convert'
Expand Down
26 changes: 26 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,32 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.2.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.52.0] - **BREAKING CHANGES**

- Module changes:
- Added two new properties to all model documentation objects:
- `Image` - designates if the model can generate images
- `Video` - designates if the model can generate video
- `Vision` - re-purposed to now designate if the model can see and describe uploaded content
- This required some logic re-work in several functions that were previously using `Vision` to designate image capability
- Added inference profile ID support to all models IAW [Supported cross-region inference profiles](https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html)
- pwshBedrock will now properly format the inference profile ID for all models that support which enables the ability to make Bedrock calls to other regions
- `Reset-ModelContext` - fixed issue where certain models were missing from validation.
- Amazon
- `Invoke-AmazonNovaTextModel` - added support for new Nova Text models: `amazon.nova-pro-v1:0`, `amazon.nova-lite-v1:0`, `amazon.nova-micro-v1:0`
- `Invoke-AmazonImageModel`
- added support for new Nova image model: `amazon.nova-canvas-v1:0`
- fixed bug where files would not always save to drive
- `CfgScale` parameter maximum adjusted from 10 to 9.9
- Meta
- Removed `meta.llama2-13b-chat-v1` and `meta.llama2-70b-chat-v1` from all functions as Bedrock has EOL these two models. - ***Breaking Change***
- Updated `Invoke-MetaModel` to support new model: `meta.llama3-3-70b-instruct-v1:0`
- stability.ai
- Updated `Invoke-StabilityAIImageModel` to support new model: `stability.sd3-5-large-v1:0`
- Updated pricing for all models
- Build changes:
- Updated bootstrap file to latest versions of modules

## [0.33.0] - **BREAKING CHANGES**

- Module changes:
Expand Down
2 changes: 2 additions & 0 deletions docs/Invoke-AmazonImageModel.md
Original file line number Diff line number Diff line change
Expand Up @@ -883,4 +883,6 @@ Image generation and variation seem to work well.
[https://docs.aws.amazon.com/bedrock/latest/userguide/titan-image-models.html](https://docs.aws.amazon.com/bedrock/latest/userguide/titan-image-models.html)
[https://docs.aws.amazon.com/nova/latest/userguide/image-gen-req-resp-structure.html](https://docs.aws.amazon.com/nova/latest/userguide/image-gen-req-resp-structure.html)
[https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-titan-image.html](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-titan-image.html)
Loading

0 comments on commit bb104df

Please sign in to comment.