Skip to content

Commit ea31f36

Browse files
committed
Rename tool parameters for consistency in Request-Response function and documentation
1 parent 12bbb60 commit ea31f36

3 files changed

Lines changed: 96 additions & 50 deletions

File tree

Docs/Request-Response.md

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,43 +33,43 @@ Request-Response
3333
[-ParallelToolCalls <Boolean>]
3434
[-Functions <IDictionary[]>]
3535
[-CustomTools <IDictionary[]>]
36-
[-UseFileSearch]
36+
[-UseFileSearchTool]
3737
[-FileSearchVectorStoreIds <String[]>]
3838
[-FileSearchMaxNumberOfResults <Int32>]
3939
[-FileSearchRanker <String>]
4040
[-FileSearchScoreThreshold <Float>]
4141
[-FileSearchHybridSearchEmbeddingWeight <Float>]
4242
[-FileSearchHybridSearchTextWeight <Float>]
43-
[-UseWebSearch]
43+
[-UseWebSearchTool]
4444
[-WebSearchType <String>]
4545
[-WebSearchContextSize <String>]
4646
[-WebSearchAllowedDomains <String[]>]
4747
[-WebSearchUserLocationCity <String>]
4848
[-WebSearchUserLocationCountry <String>]
4949
[-WebSearchUserLocationRegion <String>]
5050
[-WebSearchUserLocationTimeZone <String>]
51-
[-UseComputerUse]
51+
[-UseComputerUseTool]
5252
[-ComputerUseEnvironment <String>]
5353
[-ComputerUseDisplayHeight <Int32>]
5454
[-ComputerUseDisplayWidth <Int32>]
55-
[-UseRemoteMCP]
55+
[-UseRemoteMCPTool]
5656
[-RemoteMCPServerLabel <String>]
5757
[-RemoteMCPServerUrl <String>]
5858
[-RemoteMCPServerDescription <String>]
5959
[-RemoteMCPAllowedTools <Object>]
6060
[-RemoteMCPRequireApproval <Object>]
6161
[-RemoteMCPHeaders <IDictionary>]
6262
[-RemoteMCPAuthorization <String>]
63-
[-UseConnector]
63+
[-UseConnectorTool]
6464
[-ConnectorLabel <String>]
6565
[-ConnectorId <String>]
6666
[-ConnectorRequireApproval <String>]
6767
[-ConnectorAuthorization <String>]
68-
[-UseCodeInterpreter]
68+
[-UseCodeInterpreterTool]
6969
[-CodeInterpreterMemoryLimit <String>]
7070
[-ContainerId <String>]
7171
[-ContainerFileIds <String[]>]
72-
[-UseImageGeneration]
72+
[-UseImageGenerationTool]
7373
[-ImageGenerationModel <String>]
7474
[-ImageGenerationBackGround <String>]
7575
[-ImageGenerationInputImageMask <String>]
@@ -79,7 +79,9 @@ Request-Response
7979
[-ImageGenerationPartialImages <Int32>]
8080
[-ImageGenerationQuality <String>]
8181
[-ImageGenerationSize <String>]
82-
[-UseLocalShell]
82+
[-UseLocalShellTool]
83+
[-UseShellTool]
84+
[-UseApplyPatchTool]
8385
[-Include <String[]>]
8486
[-Truncation <String>]
8587
[-Temperature <Float>]
@@ -141,7 +143,7 @@ PS C:\> Request-Response "Summarize this document" -Files 'C:\recipient.pdf' -Mo
141143

142144
### Example 4: Web search
143145
```powershell
144-
PS C:\> Request-Response "Tell me a recent top 3 tech news." -UseWebSearch -Model 'gpt-4o'
146+
PS C:\> Request-Response "Tell me a recent top 3 tech news." -UseWebSearchTool -Model 'gpt-4o'
145147
```
146148

147149
### Example 5: Streaming output
@@ -337,7 +339,7 @@ Required: False
337339
Position: Named
338340
```
339341

340-
### -UseFileSearch
342+
### -UseFileSearchTool
341343
If you want to use the File search built-in tool, Should specify this switch as enabled.
342344

343345
```yaml
@@ -400,7 +402,7 @@ Required: False
400402
Position: Named
401403
```
402404

403-
### -UseWebSearch
405+
### -UseWebSearchTool
404406
If you want to use the Web search built-in tool, Should specify this switch as enabled.
405407

406408
```yaml
@@ -474,7 +476,7 @@ Required: False
474476
Position: Named
475477
```
476478

477-
### -UseComputerUse
479+
### -UseComputerUseTool
478480
If you want to use the Computer-use built-in tool, Should specify this switch as enabled.
479481

480482
```yaml
@@ -511,7 +513,7 @@ Required: False
511513
Position: Named
512514
```
513515

514-
### -UseRemoteMCP
516+
### -UseRemoteMCPTool
515517
If you want to use the Remote MCP built-in tool, Should specify this switch as enabled.
516518

517519
```yaml
@@ -583,7 +585,7 @@ Required: False
583585
Position: Named
584586
```
585587

586-
### -UseConnector
588+
### -UseConnectorTool
587589
If you want to use the service connector, Should specify this switch as enabled.
588590

589591
```yaml
@@ -636,7 +638,7 @@ Required: False
636638
Position: Named
637639
```
638640

639-
### -UseCodeInterpreter
641+
### -UseCodeInterpreterTool
640642
If you want to use the Code Interpreter built-in tool, Should specify this switch as enabled.
641643

642644
```yaml
@@ -673,7 +675,7 @@ Required: False
673675
Position: Named
674676
```
675677

676-
### -UseImageGeneration
678+
### -UseImageGenerationTool
677679
If you want to use the Imagae Generation built-in tool, Should specify this switch as enabled.
678680

679681
```yaml
@@ -768,7 +770,7 @@ Position: Named
768770
Default value: auto
769771
```
770772

771-
### -UseLocalShell
773+
### -UseLocalShellTool
772774
If you want to use the Local Shell built-in tool, Should specify this switch as enabled.
773775

774776
```yaml
@@ -777,6 +779,24 @@ Required: False
777779
Position: Named
778780
```
779781

782+
### -UseShellTool
783+
If you want to use the Shell built-in tool, Should specify this switch as enabled.
784+
785+
```yaml
786+
Type: SwitchParameter
787+
Required: False
788+
Position: Named
789+
```
790+
791+
### -UseApplyPatchTool
792+
If you want to use the Apply Patch built-in tool, Should specify this switch as enabled.
793+
794+
```yaml
795+
Type: SwitchParameter
796+
Required: False
797+
Position: Named
798+
```
799+
780800
### -Include
781801
Specify additional output data to include in the model response.
782802

Public/Responses/Request-Response.ps1

Lines changed: 42 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function Request-Response {
105105
# Built-in tools
106106
#region File Search
107107
[Parameter()]
108-
[switch]$UseFileSearch,
108+
[switch]$UseFileSearchTool,
109109

110110
[Parameter(DontShow)]
111111
[string]$FileSearchType = 'file_search', # Currently, only 'file_search' is acceptable.
@@ -138,7 +138,7 @@ function Request-Response {
138138

139139
#region Web Search
140140
[Parameter()]
141-
[switch]$UseWebSearch,
141+
[switch]$UseWebSearchTool,
142142

143143
[Parameter()]
144144
[Completions('web_search')]
@@ -170,7 +170,7 @@ function Request-Response {
170170

171171
#region Computer use
172172
[Parameter()]
173-
[switch]$UseComputerUse,
173+
[switch]$UseComputerUseTool,
174174

175175
[Parameter(DontShow)]
176176
[string]$ComputerUseType = 'computer_use_preview', # Currently, only 'computer_use_preview' is acceptable.
@@ -188,7 +188,7 @@ function Request-Response {
188188

189189
#region Remote MCP
190190
[Parameter()]
191-
[switch]$UseRemoteMCP,
191+
[switch]$UseRemoteMCPTool,
192192

193193
[Parameter(DontShow)]
194194
[string]$RemoteMCPType = 'mcp', # Always 'mcp'
@@ -220,7 +220,7 @@ function Request-Response {
220220

221221
#region Connectors
222222
[Parameter()]
223-
[switch]$UseConnector,
223+
[switch]$UseConnectorTool,
224224

225225
[Parameter()]
226226
[ValidateNotNullOrEmpty()]
@@ -250,7 +250,7 @@ function Request-Response {
250250

251251
#region Code Interpreter
252252
[Parameter()]
253-
[switch]$UseCodeInterpreter,
253+
[switch]$UseCodeInterpreterTool,
254254

255255
[Parameter(DontShow)]
256256
[string]$CodeInterpreterType = 'code_interpreter', # Always 'code_interpreter'
@@ -268,7 +268,7 @@ function Request-Response {
268268

269269
#region Image Generation
270270
[Parameter()]
271-
[switch]$UseImageGeneration,
271+
[switch]$UseImageGenerationTool,
272272

273273
[Parameter(DontShow)]
274274
[string]$ImageGenerationType = 'image_generation', # Always 'image_generation'
@@ -310,11 +310,21 @@ function Request-Response {
310310

311311
#region Local shell
312312
[Parameter()]
313-
[switch]$UseLocalShell,
313+
[switch]$UseLocalShellTool,
314314

315315
[Parameter(DontShow)]
316316
[string]$LocalShellType = 'local_shell', # Always 'local_shell'
317317
#endregion Local shell
318+
319+
#region shell
320+
[Parameter()]
321+
[switch]$UseShellTool,
322+
#endregion shell
323+
324+
#region Apply patch
325+
[Parameter()]
326+
[switch]$UseApplyPatchTool,
327+
#endregion Apply patch
318328
#endregion Tools
319329

320330
[Parameter()]
@@ -679,7 +689,7 @@ function Request-Response {
679689
}
680690

681691
#region File Search
682-
if ($UseFileSearch) {
692+
if ($UseFileSearchTool) {
683693
if ($FileSearchVectorStoreIds.Count -eq 0) {
684694
Write-Error 'VectorStore Ids must be specified.'
685695
}
@@ -722,7 +732,7 @@ function Request-Response {
722732
}
723733

724734
#region Web Search
725-
if ($UseWebSearch) {
735+
if ($UseWebSearchTool) {
726736
$UserLocation = @{}
727737
$WebSearchTool = @{
728738
type = $WebSearchType
@@ -756,7 +766,7 @@ function Request-Response {
756766
}
757767

758768
#region Computer Use
759-
if ($UseComputerUse) {
769+
if ($UseComputerUseTool) {
760770
# Computer Use should be used with 'truncation=auto'
761771
$PostBody.truncation = 'auto'
762772

@@ -785,7 +795,7 @@ function Request-Response {
785795
}
786796

787797
#region Remote MCP
788-
if ($UseRemoteMCP) {
798+
if ($UseRemoteMCPTool) {
789799
# Server label and URL are required.
790800
if ([string]::IsNullOrWhiteSpace($RemoteMCPServerLabel)) {
791801
Write-Error 'RemoteMCPServerLabel must be specified.'
@@ -838,7 +848,7 @@ function Request-Response {
838848
}
839849

840850
#region Connectors
841-
if ($UseConnector) {
851+
if ($UseConnectorTool) {
842852
# Server label and connector_id are required.
843853
if ([string]::IsNullOrWhiteSpace($ConnectorLabel)) {
844854
Write-Error 'ConnectorLabel must be specified.'
@@ -865,7 +875,7 @@ function Request-Response {
865875
}
866876

867877
#region Code Interpreter
868-
if ($UseCodeInterpreter) {
878+
if ($UseCodeInterpreterTool) {
869879
$CodeInterpreterTool = @{
870880
type = $CodeInterpreterType
871881
container = $ContainerId
@@ -884,7 +894,7 @@ function Request-Response {
884894
}
885895

886896
#region Image Generation
887-
if ($UseImageGeneration) {
897+
if ($UseImageGenerationTool) {
888898
$ImageGenerationTool = @{
889899
type = $ImageGenerationType
890900
}
@@ -928,13 +938,29 @@ function Request-Response {
928938
}
929939

930940
#region Local Shell
931-
if ($UseLocalShell) {
941+
if ($UseLocalShellTool) {
932942
$LocalShellTool = @{
933943
type = $LocalShellType
934944
}
935945
$Tools += $LocalShellTool
936946
}
937947

948+
#region shell
949+
if ($UseShellTool) {
950+
$ShellTool = @{
951+
type = 'shell'
952+
}
953+
$Tools += $ShellTool
954+
}
955+
956+
#region Apply Patch
957+
if ($UseApplyPatchTool) {
958+
$ApplyPatchTool = @{
959+
type = 'apply_patch'
960+
}
961+
$Tools += $ApplyPatchTool
962+
}
963+
938964
if ($Tools.Count -gt 0) {
939965
$PostBody.tools = $Tools
940966
}

0 commit comments

Comments
 (0)