diff --git a/code365scripts.openai/Public/New-ChatCompletions.ps1 b/code365scripts.openai/Public/New-ChatCompletions.ps1 index a7d49cd..97e0a35 100644 --- a/code365scripts.openai/Public/New-ChatCompletions.ps1 +++ b/code365scripts.openai/Public/New-ChatCompletions.ps1 @@ -322,7 +322,7 @@ function New-ChatCompletions { $function_args = $tool.function.arguments | ConvertFrom-Json $tool_response = Invoke-Expression ("{0} {1}" -f $tool.function.name, ( $function_args.PSObject.Properties | ForEach-Object { - "-{0} {1}" -f $_.Name, $_.Value + "-{0} '{1}'" -f $_.Name, $_.Value } ) -join " ") diff --git a/code365scripts.openai/Public/New-ChatGPTConversation.ps1 b/code365scripts.openai/Public/New-ChatGPTConversation.ps1 index 2eff43a..1a85657 100644 --- a/code365scripts.openai/Public/New-ChatGPTConversation.ps1 +++ b/code365scripts.openai/Public/New-ChatGPTConversation.ps1 @@ -620,7 +620,7 @@ function New-ChatGPTConversation { $function_args = $tool.function.arguments | ConvertFrom-Json $tool_response = Invoke-Expression ("{0} {1}" -f $tool.function.name, ( $function_args.PSObject.Properties | ForEach-Object { - "-{0} {1}" -f $_.Name, $_.Value + "-{0} '{1}'" -f $_.Name, $_.Value } ) -join " ") @@ -672,7 +672,7 @@ function New-ChatGPTConversation { $function_args = $tool.function.arguments | ConvertFrom-Json $tool_response = Invoke-Expression ("{0} {1}" -f $tool.function.name, ( $function_args.PSObject.Properties | ForEach-Object { - "-{0} {1}" -f $_.Name, $_.Value + "-{0} '{1}'" -f $_.Name, $_.Value } ) -join " ")