We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3ab628 commit 4b2b108Copy full SHA for 4b2b108
1 file changed
Public/Chat/Request-ChatCompletion.ps1
@@ -699,7 +699,7 @@ function Request-ChatCompletion {
699
#endregion
700
701
#region For history, add AI response to messages list.
702
- if ($Response.choices.message.Count -ge 1) {
+ if (@($Response.choices.message).Count -ge 1) {
703
$msg = @($Response.choices.message)[0]
704
$rcm = [ordered]@{
705
role = $msg.role
0 commit comments