Skip to content

Commit

Permalink
update to 4.0.0.2, fix a problem of update a object
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxizhang committed Jul 7, 2024
1 parent b4fb7a0 commit 76a6441
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code365scripts.openai/Public/New-ChatGPTConversation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ function New-ChatGPTConversation {
}
}

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

$messages += [PSCustomObject]@{
role = "user"
Expand Down
3 changes: 2 additions & 1 deletion code365scripts.openai/Types/OpenAIClient.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ class AssistantResource {
return $this.client.web("$($this.urifragment)/$id", "DELETE", @{})
}


[psobject]create([hashtable]$body) {
if ($this.objTypeName) {
$result = New-Object -TypeName $this.objTypeName -ArgumentList $this.client.web("$($this.urifragment)", "POST", $body)
Expand Down Expand Up @@ -188,7 +189,7 @@ class AssistantResourceObject {
}

[AssistantResourceObject]update([hashtable]$data) {
$this.client.web($this.urifragment, "PATCH", $data)
$this.client.web($this.urifragment, "POST", $data)
return $this
}
}
Expand Down
2 changes: 1 addition & 1 deletion code365scripts.openai/code365scripts.openai.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = '.\code365scripts.openai.psm1'

# Version number of this module.
ModuleVersion = '4.0.0.1'
ModuleVersion = '4.0.0.2'

# Supported PSEditions
CompatiblePSEditions = @("Desktop", "Core")
Expand Down

0 comments on commit 76a6441

Please sign in to comment.