XenoGuard 4.0 Documentation

Assistant Upload File

ActionStep Reference » OpenAI » Assistant » Assistant Upload File

The OpenAI Assistant Upload File ActionStep allows users to upload a file to the OpenAI API. This step is essential for providing the assistant with the necessary data to perform tasks that require specific file references.

[-] Hide
  1. Open the OpenAI node in the Workspace Explorer.
  2. In the Assistant node, select the Assistant Upload File ActionStep.

Parameters:

The ActionStep has the following input parameters:


Name Description
API Key
The OpenAI key to use.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [String]
File Path
The target file path to upload.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [String]
Timeout
The duration in ms before the API request times out.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [Int64]

Results:

The ActionStep returns the following results:

name Description
Success
Indicates whether the result is successful.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [Boolean]
File Id
The id of the uploaded file.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [String]

Example 1 (Upload a file and create a new assistant):

The ActionScript example illustrates a two-step process for creating an AI assistant within XenoGuard. In the first step, a specific file (`snooker-rules.pdf`) is uploaded to OpenAI's service, using an API key for authentication and a timeout setting for the operation. Upon successful upload, the file is assigned an ID. In the second step, this file ID is used to create a new assistant, named "Snooker", with the instruction to use only the uploaded file for answering questions. The assistant is created with its own unique ID, indicating the process was successful. This setup ensures that the assistant has all the necessary information to provide relevant responses based on the content of the uploaded file.

 

See other operations:

Assistant Create
Assistant Send Message
Assistant Create Thread
Assistant Delete Thread
Assistant Delete