Skip to content

Commit f5d439a

Browse files
committed
Add ImageGenerationAction parameter to Request-Response function
1 parent d1f51bc commit f5d439a

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

Docs/Request-Response.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,16 @@ Required: False
693693
Position: Named
694694
```
695695

696+
### -ImageGenerationAction
697+
Whether to generate a new image or edit an existing image. Default: `auto`.
698+
699+
```yaml
700+
Type: String
701+
Required: False
702+
Position: Named
703+
Default value: auto
704+
```
705+
696706
### -ImageGenerationBackGround
697707
Background type for the generated image. One of `transparent`, `opaque`, or `auto`
698708

Public/Responses/Request-Response.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,13 @@ function Request-Response {
282282
[string]$ImageGenerationType = 'image_generation', # Always 'image_generation'
283283

284284
[Parameter()]
285-
[Completions('gpt-image-1', 'gpt-image-1-mini')]
285+
[Completions('gpt-image-1', 'gpt-image-1-mini', 'gpt-image-1.5')]
286286
[string]$ImageGenerationModel,
287287

288+
[Parameter()]
289+
[Completions('generate', 'edit', 'auto')]
290+
[string]$ImageGenerationAction = 'auto',
291+
288292
[Parameter()]
289293
[Completions('transparent', 'opaque', 'auto')]
290294
[string]$ImageGenerationBackGround = 'auto',
@@ -909,6 +913,9 @@ function Request-Response {
909913
if ($PSBoundParameters.ContainsKey('ImageGenerationModel')) {
910914
$ImageGenerationTool.model = $ImageGenerationModel
911915
}
916+
if ($PSBoundParameters.ContainsKey('ImageGenerationAction')) {
917+
$ImageGenerationTool.action = $ImageGenerationAction
918+
}
912919
if ($PSBoundParameters.ContainsKey('ImageGenerationBackGround')) {
913920
$ImageGenerationTool.background = $ImageGenerationBackGround
914921
}

0 commit comments

Comments
 (0)