Skip to content

Commit 2f95bf9

Browse files
committed
fixed minor bugs
1 parent 76a6441 commit 2f95bf9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

code365scripts.openai/Types/OpenAIClient.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ class AssistantResourceObject {
189189
}
190190

191191
[AssistantResourceObject]update([hashtable]$data) {
192-
$this.client.web($this.urifragment, "POST", $data)
193-
return $this
192+
$result = $this.client.web($this.urifragment, "POST", $data)
193+
return New-Object -TypeName $this.GetType().Name -ArgumentList $result
194194
}
195195
}
196196

@@ -359,6 +359,7 @@ class Assistant:AssistantResource {
359359

360360
$result = [AssistantObject]::new($this.client.web("$($this.urifragment)", "POST", $body))
361361
$result | Add-Member -MemberType NoteProperty -Name client -Value $this.client
362+
$result | Add-Member -MemberType NoteProperty -Name urifragment -Value "$($this.urifragment)/$($result.id)"
362363
return $result
363364
}
364365

0 commit comments

Comments
 (0)