Skip to content

Commit ac2c2a7

Browse files
authored
执行数据库查询的函数会报错,而且无法正常返回数据 (#276)
Fixes #275
2 parents 4f492e3 + 67cb505 commit ac2c2a7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

code365scripts.openai/Public/New-ChatCompletions.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ function New-ChatCompletions {
322322
$function_args = $tool.function.arguments | ConvertFrom-Json
323323
$tool_response = Invoke-Expression ("{0} {1}" -f $tool.function.name, (
324324
$function_args.PSObject.Properties | ForEach-Object {
325-
"-{0} {1}" -f $_.Name, $_.Value
325+
"-{0} '{1}'" -f $_.Name, $_.Value
326326
}
327327
) -join " ")
328328

code365scripts.openai/Public/New-ChatGPTConversation.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ function New-ChatGPTConversation {
620620
$function_args = $tool.function.arguments | ConvertFrom-Json
621621
$tool_response = Invoke-Expression ("{0} {1}" -f $tool.function.name, (
622622
$function_args.PSObject.Properties | ForEach-Object {
623-
"-{0} {1}" -f $_.Name, $_.Value
623+
"-{0} '{1}'" -f $_.Name, $_.Value
624624
}
625625
) -join " ")
626626

@@ -672,7 +672,7 @@ function New-ChatGPTConversation {
672672
$function_args = $tool.function.arguments | ConvertFrom-Json
673673
$tool_response = Invoke-Expression ("{0} {1}" -f $tool.function.name, (
674674
$function_args.PSObject.Properties | ForEach-Object {
675-
"-{0} {1}" -f $_.Name, $_.Value
675+
"-{0} '{1}'" -f $_.Name, $_.Value
676676
}
677677
) -join " ")
678678

0 commit comments

Comments
 (0)