Skip to content

Submit OAIMessage

dfinke edited this page Apr 20, 2024 · 2 revisions

Submit-OAIMessage

SYNOPSIS

Submits an OpenAI message and run.

SYNTAX

Submit-OAIMessage [[-Assistant] <Object>] [[-Thread] <Object>] [[-UserInput] <Object>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

The Submit-OAIMessage function is used to submit an OpenAI message and run. It creates a new message using the New-OAIMessage cmdlet and a new run using the New-OAIRun cmdlet. The function takes three parameters: $Assistant, $Thread, and $UserInput.

EXAMPLES

EXAMPLE 1

Submit-OAIMessage -Assistant $assistant -Thread $thread -UserInput "Hello, how can I help you?"

This example submits a user message to the OpenAI assistant and creates a new run.

PARAMETERS

-Assistant

The assistant object representing the OpenAI assistant.

Type: Object
Parameter Sets: (All)
Aliases:

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

-Thread

The thread object representing the conversation thread.

Type: Object
Parameter Sets: (All)
Aliases:

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

-UserInput

The user input to be submitted as a message.

Type: Object
Parameter Sets: (All)
Aliases:

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

None.

OUTPUTS

System.Object[]

The function returns an array containing the run and message objects.

NOTES

RELATED LINKS

Clone this wiki locally