OpenAI GPT (Independent Publisher) (Preview)

OpenAI is an artificial intelligence research laboratory. The company conducts research in the field of AI with the stated goal of promoting and developing friendly AI in a way that benefits humanity as a whole. Through this connector you can access the Generative Pre-trained Transformer 4 (GPT-4), an autoregressive language model that uses deep learning to produce human-like text, plus many other models.

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/api/policies/terms/
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 securestring The key for this service. Must be in the format 'Bearer yourAPIKey'. True

Throttling Limits

Name Calls Renewal Period
API calls per connection10060 seconds

Actions

Create completion

Creates a completion for the provided prompt and parameters.

Edit Prompt

Creates a new edit for the provided input, instruction, and parameters.

Get chat completions

Retrieves a chat completion powered by ChatGPT.

List models

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

Create completion

Creates a completion for the provided prompt and parameters.

Parameters

Name Key Required Type Description
Model
model True string

ID of the model to use.

Prompt
prompt string

The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.

Max Tokens
max_tokens integer

The maximum number of tokens to generate in the completion.

Temperature
temperature double

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

Top P
top_p double

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

N
n integer

How many completions to generate for each prompt.

Log Probabilities
logprobs string

Include the log probabilities on the logprobs most likely tokens, as well the chosen tokens.

Stop
stop string

A sequence where the service will stop generating further tokens.

Returns

Name Path Type Description
first_completion
first_completion string

first_completion

ID
result.id string

The identifier.

Object
result.object string

The object.

Created
result.created integer

When created.

Model
result.model string

The model.

Choices
result.choices array of object
Text
result.choices.text string

The text.

Index
result.choices.index integer

The index

Log Probs
result.choices.logprobs string

The log probs.

Finish Reason
result.choices.finish_reason string

The finish reason

Prompt Tokens
result.usage.prompt_tokens integer

The prompt tokens.

Completion Tokens
result.usage.completion_tokens integer

The completion tokens.

Total Tokens
result.usage.total_tokens integer

The total tokens.

Edit Prompt

Creates a new edit for the provided input, instruction, and parameters.

Parameters

Name Key Required Type Description
Model
model True string

ID of the model to use.

Input
input string

The input text to use as a starting point for the edit.

Instruction
instruction True string

The instruction that tells the model how to edit the prompt.

N
n integer

How many edits to generate for the input and instruction.

Temperature
temperature double

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

Top P
top_p double

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

Returns

Name Path Type Description
Object
object string

The object.

Created
created integer

When created.

Choices
choices array of object

The choices.

Text
choices.text string

The text.

Index
choices.index integer

The index.

Prompt Tokens
usage.prompt_tokens integer

The prompt tokens.

Completion Tokens
usage.completion_tokens integer

The completion tokens.

Total Tokens
usage.total_tokens integer

The total tokens.

Get chat completions

Retrieves a chat completion powered by ChatGPT.

Parameters

Name Key Required Type Description
Model
model True string

The chat model.

Role
role True string

The role.

Content
content True string

The content.

Max Tokens
max_tokens integer

The maximum number of tokens to generate in the completion.

Temperature
temperature double

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

Top P
top_p double

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

N
n integer

How many completions to generate for each prompt.

Stop
stop string

A sequence where the service will stop generating further tokens.

Presence Penalty
presence_penalty double

Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.

Frequency Penalty
frequency_penalty double

Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.

User
user string

A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.

Returns

Name Path Type Description
First Content
first_content string

The first content.

ID
id string

The identifier.

Object
object string

The object.

Created
created integer

When created.

Choices
choices array of object
Index
choices.index integer

The index.

Role
choices.message.role string

The role.

Content
choices.message.content string

The content.

Finish Reason
choices.finish_reason string

The finish reason.

Prompt Tokens
usage.prompt_tokens integer

The prompt tokens.

Completion Tokens
usage.completion_tokens integer

The completion tokens.

Total Tokens
usage.total_tokens integer

The total tokens.

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

The owned by.

Permission
data.permission array of object
ID
data.permission.id string

The identifier.

Object
data.permission.object string

The object.

Created
data.permission.created integer

When created.

Allow Create Engine
data.permission.allow_create_engine boolean

Whether to allow create engine.

Allow Sampling
data.permission.allow_sampling boolean

Whether to allow sampling.

Allow Logprobs
data.permission.allow_logprobs boolean

Whether to allow logprobs.

Allow Search Indices
data.permission.allow_search_indices boolean

Whether to allow search indices .

Allow View
data.permission.allow_view boolean

Whether to allow view.

Allow Fine Tuning
data.permission.allow_fine_tuning boolean

Whether to allow fine tuning.

Organization
data.permission.organization string

The organization.

Group
data.permission.group string

The group.

Is Blocking
data.permission.is_blocking boolean

Whether is blocked.

Root
data.root string

The root.

Parent
data.parent string

The parent.