Partilhar via


OpenAI Assistants (Independent Publisher) (Preview)

OpenAI Assistants allows you to build AI assistants within your own applications. An Assistant has instructions and can leverage models, tools, and knowledge to respond to user queries. The Assistants service currently supports three types of tools: Code Interpreter, Retrieval, and Function calling.

This connector is available in the following products and regions:

Service Class Regions
Logic Apps Standard All Logic Apps regions except the following:
     -   Azure Government regions
     -   Azure China regions
     -   US Department of Defense (DoD)
Power Automate Premium All Power Automate regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Power Apps Premium All Power Apps regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Contact
Name Troy Taylor
URL https://www.hitachisolutions.com
Email ttaylor@hitachisolutions.com
Connector Metadata
Publisher Troy Taylor
Website https://openai.com/
Privacy policy https://openai.com/policies/privacy-policy
Categories AI

Creating a connection

The connector supports the following authentication types:

Default Parameters for creating connection. All regions Not shareable

Default

Applicable: All regions

Parameters for creating connection.

This is not shareable connection. If the power app is shared with another user, another user will be prompted to create new connection explicitly.

Name Type Description Required
API Key (in the form 'Bearer $OPENAI_API_KEY') securestring The API Key (in the form 'Bearer $OPENAI_API_KEY') for this api True

Throttling Limits

Name Calls Renewal Period
API calls per connection 100 60 seconds

Actions

Cancel a run

Cancel a run for a thread that is in progress.

Create assistant

Create an assistant with a model and instructions.

Create assistant file

Create an assistant file by attaching a file to an assistant.

Create message

Create a message within a thread.

Create run

Creates a run for a thread.

Create thread

Creates a thread that assistants can interact with.

Create thread and run

Creates a thread and run it in one request.

Delete assistant

Deletes an assistant.

Delete assistant file

Deletes an assistant file.

Delete thread

Deletes a thread.

Get assistant files

Retrieves a list of assistant files.

Get run

Retrieve a run from a thread.

Get run step

Retrieve a run step for a thread.

Get thread

Retrieve a thread.

List assistants

Retrieves a list of assistants.

List message files

Retrieves a list of message files for a thread.

List messages

Retrieve a list of messages for a given thread.

List models

Lists the currently available models, and provides basic information about each one such as the owner and availability.

List run steps

Retrieve a list of run steps for a thread.

List runs

Retrieve a list of runs for a thread.

Modify a thread

Modifies a thread.

Modify message

Modifies a message.

Modify run

Modifies a run for a thread.

Retrieve assistant

Retrieves information about an assistant.

Retrieve assistant file

Retrieves an assistant file.

Retrieve message file

Retrieves a message file from a thread.

Submit tool outputs to run

When a run has the status: "requires_action" and required_action.type is submit_tool_outputs, this action can be used to submit the outputs from the tool calls once they're all completed.

Cancel a run

Cancel a run for a thread that is in progress.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Run ID
run_id True string

The run identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Assistant ID
assistant_id string

The assistant identifier.

Thread ID
thread_id string

The thread identifier.

Status
status string

The status.

Started At
started_at integer

When started at.

Expires At
expires_at integer

When expires at.

Cancelled At
cancelled_at string

When cancelled at.

Failed At
failed_at string

When failed at.

Completed At
completed_at string

When completed at.

Last Error
last_error string

The last error.

Model
model string

The model.

Instructions
instructions string

The instructions.

Tools
tools array of object
Type
tools.type string

The tools type.

File IDs
file_ids array of string

The file identifiers.

Create assistant

Create an assistant with a model and instructions.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Model
model True string

The model.

Instructions
instructions string

The instructions.

Name
name string

The name.

Description
description string

The description.

Type
type string

The tools type.

File IDs
file_ids array of string

The file identifiers.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Name
name string

The name.

Description
description string

The description.

Model
model string

The model.

Instructions
instructions string

The instructions.

Tools
tools array of object
Type
tools.type string

The tool type.

File IDs
file_ids array of string

The file identifiers.

Create assistant file

Create an assistant file by attaching a file to an assistant.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Assistant ID
assistant_id True string

The assistant identifier.

File ID
file_id True string

The file identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Assistant ID
assistant_id string

The assistant identifier.

Create message

Create a message within a thread.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Thread ID
thread_id string

The thread identifier.

Role
role string

The role.

Content
content array of object
Type
content.type string

The tools type.

Value
content.text.value string

The value.

Annotations
content.text.annotations array of string

The annotations.

File IDs
file_ids array of string

The file identifiers.

Assistant ID
assistant_id string

The assistant identifier.

Run ID
run_id string

The run identifier.

Create run

Creates a run for a thread.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Assistant ID
assistant_id string

The assistant identifier.

Model
model True string

The model.

Instructions
instructions string

The instructions.

Type
type string

The tools type.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Assistant ID
assistant_id string

The assistant identifier.

Thread ID
thread_id string

The thread identifier.

Status
status string

The status.

Started At
started_at integer

When started at.

Expires At
expires_at string

When expires at.

Cancelled At
cancelled_at string

When cancelled at.

Failed At
failed_at string

When failed at.

Completed At
completed_at integer

When completed at.

Last Error
last_error string

The last error.

Model
model string

The model.

Instructions
instructions string

The instructions.

Tools
tools array of object
Type
tools.type string

The tools type.

File IDs
file_ids array of string

The file identifiers.

Create thread

Creates a thread that assistants can interact with.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Thread ID
thread_id string

The thread identifier.

Role
role True string

The role.

Content
content True string

The content.

File IDs
file_ids array of string

The file identifiers.

Assistant ID
assistant_id string

The assistant identifier.

Run ID
run_id string

The run identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Create thread and run

Creates a thread and run it in one request.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Assistant ID
assistant_id string

The assistant identifier.

Role
role string

The role.

Content
content string

The content.

Model
model string

The model.

Intructions
instructions string

The instructions.

Type
type string

The tools type.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Assistant ID
assistant_id string

The assistant identifier.

Thread ID
thread_id string

The thread identifier.

Status
status string

The status.

Started At
started_at string

When started at.

Expires At
expires_at integer

When expires at.

Cancelled At
cancelled_at string

When cancelled at.

Failed At
failed_at string

When failed at.

Completed At
completed_at string

When completed at.

Last Error
last_error string

The last error.

Model
model string

The model.

Instructions
instructions string

The instructions.

Tools
tools array of object
Type
tools.type string

The tools type.

File IDs
file_ids array of string

The file identifiers.

Delete assistant

Deletes an assistant.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Assistant ID
assistant_id True string

The assistant identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Deleted
deleted boolean

Whether deleted.

Delete assistant file

Deletes an assistant file.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Assistant ID
assistant_id True string

The assistant identifier.

File ID
file_id True string

The file identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Deleted
deleted boolean

Whether deleted.

Delete thread

Deletes a thread.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Deleted
deleted boolean

Whether deleted.

Get assistant files

Retrieves a list of assistant files.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Assistant ID
assistant_id True string

The assistant identifier.

Returns

Name Path Type Description
Object
object string

The object.

Data
data array of object
ID
data.id string

The identifier.

Object
data.object string

The object.

Created At
data.created_at integer

When created at.

Assistant ID
data.assistant_id string

The assistant identifier.

First ID
first_id string

The first identifier.

Last ID
last_id string

The last identifier.

Has More
has_more boolean

Whether has more.

Get run

Retrieve a run from a thread.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Run ID
run_id True string

The run identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Assistant ID
assistant_id string

The assistant identifier.

Thread ID
thread_id string

The thread identifier.

Status
status string

The status.

Started At
started_at integer

When started at.

Expires At
expires_at string

When expires at.

Cancelled At
cancelled_at string

When cancelled at.

Failed At
failed_at string

When failed at.

Completed At
completed_at integer

When completed at.

Last Error
last_error string

The last error.

Model
model string

The model.

Instructions
instructions string

The instructions.

Tools
tools array of object
Type
tools.type string

The tools type.

File IDs
file_ids array of string

The file identifiers.

Get run step

Retrieve a run step for a thread.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Run ID
run_id True string

The run identifier.

Step ID
step_id True string

The step identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Run ID
run_id string

The run identifier.

Assistant ID
assistant_id string

The assistant identifier.

Thread ID
thread_id string

The thread identifier.

Type
type string

The type.

Status
status string

The status.

Cancelled At
cancelled_at string

When cancelled at.

Completed At
completed_at integer

When completed at.

Expired At
expired_at string

When expired at.

Failed At
failed_at string

When failed at.

Last Error
last_error string

The last error.

Type
step_details.type string

The type.

Message ID
step_details.message_creation.message_id string

The message identifier.

Get thread

Retrieve a thread.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

List assistants

Retrieves a list of assistants.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Returns

Name Path Type Description
Object
object string

The object.

Data
data array of object
ID
data.id string

The identifier.

Object
data.object string

The object.

Created At
data.created_at integer

When created at.

Name
data.name string

The name.

Description
data.description string

The description.

Model
data.model string

The model.

Instructions
data.instructions string

The instructions.

Tools
data.tools array of object
Type
data.tools.type string

The type.

File IDs
data.file_ids array of string

The file identifiers.

First ID
first_id string

The first identifier.

Last ID
last_id string

The last identifier.

Has More
has_more boolean

Whether has more.

List message files

Retrieves a list of message files for a thread.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Message ID
message_id True string

The message identifier.

Returns

Name Path Type Description
Object
object string

The object.

Data
data array of object
ID
data.id string

The identifier.

Object
data.object string

The object.

Created At
data.created_at integer

When created at.

Message ID
data.message_id string

The message identifier.

First ID
first_id string

The first identifier.

Last ID
last_id string

The last identifier.

Has More
has_more boolean

Whether has more.

List messages

Retrieve a list of messages for a given thread.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Limit
limit integer

The limit.

Order
order string

The order.

After
after string

The after.

Before
before string

The before.

Returns

Name Path Type Description
Object
object string

The object.

Data
data array of object
ID
data.id string

The identifier.

Object
data.object string

The object.

Created At
data.created_at integer

When created at.

Thread ID
data.thread_id string

The thread identifier.

Role
data.role string

The role.

Content
data.content array of object
Type
data.content.type string

The type.

Value
data.content.text.value string

The value.

Annotations
data.content.text.annotations array of string

The annotations.

File IDs
data.file_ids array of string

The file identifiers.

Assistant ID
data.assistant_id string

The assistant identifier.

Run ID
data.run_id string

The run identifier.

First ID
first_id string

The first identifier.

Last ID
last_id string

The last identifier.

Has More
has_more boolean

Whether has more.

List models

Lists the currently available models, and provides basic information about each one such as the owner and availability.

Returns

Name Path Type Description
Object
object string

The object.

Data
data array of object
ID
data.id string

The identifier.

Object
data.object string

The object.

Created
data.created integer

When created.

Owned By
data.owned_by string

Owned by.

List run steps

Retrieve a list of run steps for a thread.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Run ID
run_id True string

The run identifier.

Limit
limit integer

The limit.

Order
order string

The order.

After
after string

The after.

Before
before string

The before.

Returns

Name Path Type Description
Object
object string

The object.

Data
data array of object
ID
data.id string

The identifier.

Object
data.object string

The object.

Created At
data.created_at integer

When created at.

Run ID
data.run_id string

The run identifier.

Assistant ID
data.assistant_id string

The assistant identifier.

Thread ID
data.thread_id string

The thread identifier.

Type
data.type string

The tools type.

Status
data.status string

The status.

Cancelled At
data.cancelled_at string

When cancelled at.

Completed At
data.completed_at integer

When completed at.

Expired At
data.expired_at string

When expired at.

Failed At
data.failed_at string

When failed at.

Last Error
data.last_error string

The last error.

Type
data.step_details.type string

The type.

Message ID
data.step_details.message_creation.message_id string

The message identifier.

First ID
first_id string

The first identifier.

Last ID
last_id string

The last identifier.

Has More
has_more boolean

Whether has more.

List runs

Retrieve a list of runs for a thread.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Limit
limit integer

The limit.

Order
order string

The order.

After
after string

The after.

Before
before string

The before.

Returns

Name Path Type Description
Object
object string

The object.

Data
data array of object
ID
data.id string

The identifier.

Object
data.object string

The object.

Created At
data.created_at integer

When created at.

Assistant ID
data.assistant_id string

The assistant identifier.

Thread ID
data.thread_id string

The thread identifier.

Status
data.status string

The status.

Started At
data.started_at integer

When started at.

Expires At
data.expires_at string

When expires at.

Cancelled At
data.cancelled_at string

When cancelled at.

Failed At
data.failed_at string

When failed at.

Completed At
data.completed_at integer

When completed at.

Last Error
data.last_error string

The last error.

Model
data.model string

The model.

Instructions
data.instructions string

The instructions.

Tools
data.tools array of object
Type
data.tools.type string

The type.

File IDs
data.file_ids array of string

The file identifiers.

First ID
first_id string

The first identifier.

Last ID
last_id string

The last identifier.

Has More
has_more boolean

Whether has more.

Modify a thread

Modifies a thread.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Modify message

Modifies a message.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Message ID
message_id True string

The message identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Thread ID
thread_id string

The thread identifier.

Role
role string

The role.

Content
content array of object
Type
content.type string

The tools type.

Value
content.text.value string

The value.

Annotations
content.text.annotations array of string

The annotations.

File IDs
file_ids array of string

The file identifiers.

Assistant ID
assistant_id string

The assistant identifier.

Run ID
run_id string

The run identifier.

Modify run

Modifies a run for a thread.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Run ID
run_id True string

The run identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Assistant ID
assistant_id string

The assistant identifier.

Thread ID
thread_id string

The thread identifier.

Status
status string

The status.

Started At
started_at integer

When started at.

Expires At
expires_at string

When expires at.

Cancelled At
cancelled_at string

When cancelled at.

Failed At
failed_at string

When failed at.

Completed At
completed_at integer

When completed at.

Last Error
last_error string

The last error.

Model
model string

The model.

Instructions
instructions string

The instructions.

Tools
tools array of object
Type
tools.type string

The tools type.

File IDs
file_ids array of string

The file identifiers.

Retrieve assistant

Retrieves information about an assistant.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Assistant ID
assistant_id True string

The assistant identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Name
name string

The name.

Description
description string

The description.

Model
model string

The model.

Instructions
instructions string

The instructions.

Tools
tools array of object
Type
tools.type string

The tools type.

File IDs
file_ids array of string

The file identifiers.

Retrieve assistant file

Retrieves an assistant file.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Assistant ID
assistant_id True string

The assistant identifier.

File ID
file_id True string

The file identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Assistant ID
assistant_id string

The assistant identifier.

Retrieve message file

Retrieves a message file from a thread.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Message ID
message_id True string

The message identifier.

File ID
file_id True string

The file identifier.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Message ID
message_id string

The message identifier.

Submit tool outputs to run

When a run has the status: "requires_action" and required_action.type is submit_tool_outputs, this action can be used to submit the outputs from the tool calls once they're all completed.

Parameters

Name Key Required Type Description
Beta Header
OpenAI-Beta True string

The beta header. Required to be set while the API is in beta.

Thread ID
thread_id True string

The thread identifier.

Run ID
run_id True string

The run identifier.

Tool Call ID
tool_call_id string

The toll call identifier.

Output
output string

The output.

Returns

Name Path Type Description
ID
id string

The identifier.

Object
object string

The object.

Created At
created_at integer

When created at.

Assistant ID
assistant_id string

The assistant identifier.

Thread ID
thread_id string

The thread identifier.

Status
status string

The status.

Started At
started_at integer

When started at.

Expires At
expires_at integer

When expires at.

Cancelled At
cancelled_at string

When cancelled at.

Failed At
failed_at string

When failed at.

Completed At
completed_at string

When completed at.

Last Error
last_error string

The last error.

Model
model string

The model.

Instructions
instructions string

The instructions.

Tools
tools array of object
Type
tools.type string

The tools type.

Name
tools.function.name string

The name.

Description
tools.function.description string

The description.

Type
tools.function.parameters.type string

The type.

File IDs
file_ids array of string

The file identifiers.