Skip to content

Commit 76a6441

Browse files
committed
update to 4.0.0.2, fix a problem of update a object
1 parent b4fb7a0 commit 76a6441

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

code365scripts.openai/Public/New-ChatGPTConversation.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ function New-ChatGPTConversation {
471471
}
472472
}
473473

474-
Write-Host -ForegroundColor ("blue", "red", "Green", "yellow", "gray", "black", "white" | Get-Random) ("`r$($resources.thinking) {0}" -f ("." * (Get-Random -Maximum 10 -Minimum 3))) -NoNewline
474+
Write-Host -ForegroundColor Green ("`r$($resources.thinking) {0}" -f ("." * (Get-Random -Maximum 10 -Minimum 3))) -NoNewline
475475

476476
$messages += [PSCustomObject]@{
477477
role = "user"

code365scripts.openai/Types/OpenAIClient.ps1

+2-1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ class AssistantResource {
150150
return $this.client.web("$($this.urifragment)/$id", "DELETE", @{})
151151
}
152152

153+
153154
[psobject]create([hashtable]$body) {
154155
if ($this.objTypeName) {
155156
$result = New-Object -TypeName $this.objTypeName -ArgumentList $this.client.web("$($this.urifragment)", "POST", $body)
@@ -188,7 +189,7 @@ class AssistantResourceObject {
188189
}
189190

190191
[AssistantResourceObject]update([hashtable]$data) {
191-
$this.client.web($this.urifragment, "PATCH", $data)
192+
$this.client.web($this.urifragment, "POST", $data)
192193
return $this
193194
}
194195
}

code365scripts.openai/code365scripts.openai.psd1

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = '.\code365scripts.openai.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '4.0.0.1'
15+
ModuleVersion = '4.0.0.2'
1616

1717
# Supported PSEditions
1818
CompatiblePSEditions = @("Desktop", "Core")

0 commit comments

Comments
 (0)