We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 978f5af commit 5cdc81bCopy full SHA for 5cdc81b
1 file changed
Providers/OpenAI.ps1
@@ -38,13 +38,13 @@ function Invoke-OpenAIProvider {
38
39
# Process tools: if strings, register them; then convert to provider schema
40
if ($Tools) {
41
- $toolDefinitions = @()
+ $toolDefinitions = New-Object System.Collections.Generic.List[object]
42
foreach ($tool in $Tools) {
43
if ($tool -is [string]) {
44
- $toolDefinitions += Register-Tool $tool
+ $toolDefinitions.Add((Register-Tool $tool))
45
}
46
else {
47
- $toolDefinitions += $tool
+ $toolDefinitions.Add($tool)
48
49
50
$Tools = ConvertTo-ProviderToolSchema -Tools $toolDefinitions -Provider openai
0 commit comments