Skip to content

Commit 1771e2c

Browse files
committed
Improve debug output
1 parent 4179499 commit 1771e2c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Private/Invoke-OpenAIAPIRequest.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ function Invoke-OpenAIAPIRequest {
153153
$IwrParam.Body = ([System.Text.Encoding]::UTF8.GetBytes($JsonBody))
154154
}
155155
else {
156+
if ($IsDebug) { try { $JsonBody = ($Body | ConvertTo-Json -Compress -Depth 0) }catch {} } # Only for debug output
156157
$IwrParam.Body = $InternalParams.Body
157158
}
158159
}

0 commit comments

Comments
 (0)