Skip to content

New OAIAssistant

dfinke edited this page Apr 20, 2024 · 2 revisions

New-OAIAssistant

SYNOPSIS

Creates a new OpenAI Assistant.

SYNTAX

New-OAIAssistant [[-Name] <Object>] [[-Instructions] <Object>] [[-Description] <Object>] [[-Tools] <Object>]
 [[-Model] <Object>] [[-FileIds] <Object>] [[-Metadata] <Object>] [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

DESCRIPTION

The New-OAIAssistant function is used to create a new OpenAI Assistant. It sends a POST request to the OpenAI API to create the assistant with the specified parameters.

EXAMPLES

EXAMPLE 1

New-OAIAssistant -Name 'MyAssistant' -Instructions 'Please assist me with my tasks.' -Description 'An assistant to help with various tasks.' -Tools 'PowerShell', 'Azure CLI' -Model 'gpt-4' -FileIds 'file1', 'file2' -Metadata @{ 'key1' = 'value1'; 'key2' = 'value2' }

PARAMETERS

-Name

The name of the assistant.

Type: Object
Parameter Sets: (All)
Aliases:

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

-Instructions

The instructions for the assistant.

Type: Object
Parameter Sets: (All)
Aliases:

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

-Description

The description of the assistant.

Type: Object
Parameter Sets: (All)
Aliases:

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

-Tools

The tools used by the assistant.

Type: Object
Parameter Sets: (All)
Aliases:

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

-Model

The model to be used by the assistant. Valid values are 'gpt-4', 'gpt-3.5-turbo', 'gpt-3.5-turbo-16k', 'gpt-4-1106-preview', 'gpt-4-turbo-preview', and 'gpt-3.5-turbo-1106'. The default value is 'gpt-3.5-turbo'.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: Gpt-3.5-turbo
Accept pipeline input: False
Accept wildcard characters: False

-FileIds

The file IDs associated with the assistant.

Type: Object
Parameter Sets: (All)
Aliases: file_ids

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

-Metadata

The metadata associated with the assistant.

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
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