Skip to main content

Azure OpenAI Service Component

Interact with OpenAI models, including Chat GPT and DALL·E

Component key: azure-openai-service

Description

OpenAI is an artifical intelligence research laboratory that conducts AI research. It has notably produced the chat AI ChatGPT and the image generator DALL·E.

This component wraps some of OpenAI's REST API endpoints. Additional endpoints can be referenced in their API documentation. You can use the Raw Request action to interact with endpoints that are not convered by other actions.

Connections

OpenAI API Key

If you'd like to use an Azure OpenAI resource, you must have an Azure subscription and Azure OpenAI access. This will allow you to create an Azure OpenAI resource and get both a connection URL as well as API keys. For more information, see Quickstart: Get started generating text using Azure OpenAI Service.

Integrations can authenticate with OpenAI using API keys or Microsoft Entra Tokens:

To generate an API key from OpenAI:

  1. Navigate toplatform.openai.com/account/api-keys and generate a new key. a. If your user is associate with one organization, you can leave the connection's organization field blank. Otherwise, specify your organization's ID.

To generate a token using Microsoft Entra authentication refer to the following authentication with Microsoft Entra ID guide for detailed prerequisites and configuration.

If you'd like to use the Azure OpenAI JS client library to connect to non-Azure OpenAI, you'll need an API key from a developer account at https://platform.openai.com/.

Actions

Create Chat Completion

Create a completion for the chat message | key: createChatCompletion


Create Image

Create image(s) given a prompt | key: createImage

Output Example Payload

{
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}

Create Multiple Chat Completion

Generate Multiple Completions | key: createCompletions


Raw Request

Send raw HTTP request to Azure OpenAI | key: rawRequest


Summarize Text

Summarize a given text | key: summarizeText

Output Example Payload

{
"data": [
{
"text": "How are you today?",
"index": 0,
"logprobs": null,
"finishReason": null
}
]
}