-
Notifications
You must be signed in to change notification settings - Fork 28
Add OAIToolsToList
Adds tools and functions to a list for use with OpenAI Assistants.
Add-OAIToolsToList [[-Tools] <Object>] [[-FunctionJson] <Object>] [-Body] <Hashtable>
[-ProgressAction <ActionPreference>] [<CommonParameters>]
The Add-OAIToolsToList function is used to add tools and functions to a list, which can be used with OpenAI Assistants. It takes in parameters for the tools, function JSON, and a hashtable representing the body of the request. The function then constructs a list of tools and functions based on the provided parameters and updates the 'tools' property of the body hashtable.
Add-OAIToolsToList -Tools 'spellcheck' -FunctionJson @('{"type": "function", "function": "function_json"}') -Body $body
Adds the 'spellcheck' tool and a function JSON object to the list of tools in the body hashtable.
An optional array of strings representing the tools to be added to the list.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseAn optional array of function JSON objects representing the functions to be added to the list.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseA mandatory hashtable representing the body of the request.
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
https://platform.openai.com/docs/assistants/tools/defining-functions