Skip to content

Format OAIFunctionCall

dfinke edited this page Apr 20, 2024 · 2 revisions

Format-OAIFunctionCall

SYNOPSIS

Formats the function call specification for the OAI (OpenAPI Initiative) generator.

SYNTAX

Format-OAIFunctionCall [-FunctionSpec] <Object> [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

The Format-OAIFunctionCall function takes a function call specification and formats it for use with the OAI generator. It supports different input types such as string, hashtable, FunctionInfo, and array.

EXAMPLES

EXAMPLE 1

Format-OAIFunctionCall -FunctionSpec '{"name": "Get-User", "parameters": {"id": 123}}'
Formats the specified function call specification as a hashtable.

EXAMPLE 2

Format-OAIFunctionCall -FunctionSpec (Get-Command Get-User)
Formats the specified FunctionInfo object as a hashtable.

EXAMPLE 3

Format-OAIFunctionCall -FunctionSpec @('{"name": "Get-User", "parameters": {"id": 123}}', '{"name": "Set-User", "parameters": {"id": 456}}')
Formats each function call specification in the array as a hashtable.

PARAMETERS

-FunctionSpec

Specifies the function call specification to be formatted. It can be a string, hashtable, FunctionInfo object, or an array of function call specifications.

Type: Object
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

RELATED LINKS

Clone this wiki locally