Prompt Flow Connection to OpenAI

We will explore integrating Azure Machine Learning Prompt Flow with OpenAI to leverage advanced machine learning and innovative technologies. This article guides readers through creating an OpenAI API key, setting up the Prompt Flow connection, and using Azure’s infrastructure with OpenAI solutions. The walkthrough lays the foundation for harnessing combined potential, enhancing predictive modeling, and…

In this article, we explore creating a connection between Azure Machine Learning Prompt Flow and OpenAI. This integration offers the opportunity to utilize advanced machine learning capabilities alongside OpenAI’s innovative technologies. By connecting Azure’s strong machine learning infrastructure with OpenAI’s solutions, users can drive impactful developments, streamline processes, enhance predictive modeling, and advance AI-driven solutions in various areas. This walkthrough provides valuable insights into setting up this connection, laying the foundation for harnessing the combined potential of Azure Machine Learning and OpenAI.

Prerequisites

Create OpenAI API Key

Login to your OpenAI API account and choose Create new secret key under API Keys.

OpenAI API account API keys page

Give your API key a meaningful name.

OpenAI Create new secret key

Click Create secret key and save your key, keep it secret, keep it safe!!

Set up Prompt Flow Connection

The Azure Machine Learning Prompt Flow Connection helps keep confidential credentials secure, like the secret keys for OpenAI. We’re setting up a new connection from Prompt Flow to OpenAI.

To begin, go to the homepage of the prompt flow and choose the Connections tab. Connections are shared resources accessible to all workspace members. Click on the Create button and choose “OpenAI” from the drop-down menu.

Azure Machine Learning Prompt Flow - Create OpenAI Connection

After clicking “OpenAI” a panel will open up on the right side of the screen.

Azure Machine Learning Prompt Flow - Add OpenAI connection
FieldValue
NameUnique connection name
ProviderDefaults to OpenAI
API keyPaste your OpenAI API key from step “Create OpenAI API Key”
OrganizationThe Organization ID located under the OpenAI organization settings page (see screenshot below)
Base URLThe OpenAI API base URL (I have tested with https://api.openai.com/v1)
Azure Machine Learning Prompt Flow – Add OpenAI Connection

The Organization ID is located on the OpenAI Organization settings page.

OpenAI Organization Settings - Organization ID

Click Save to complete the creation of you OpenAI Prompt Flow connection.

If you have access to a Flow, your new connection will be available in the connection dropdown of the LLM tool.

Azure Machine Learning Prompt Flow - LLM Tool using OpenAI connection

Congratulations, you’ve connected to OpenAI using Prompt Flow. See the tutorial: Azure Prompt Flow with Vector Search to learn how to use this connection.

9 responses to “Prompt Flow Connection to OpenAI”

  1. […] If you prefer to use the OpenAI APIs instead of Azure OpenAI, you can find instructions on setting up a Prompt Flow connection to OpenAI in this article: Prompt Flow Connection to OpenAI […]

    Like

  2. […] The key to connect to OpenAI API. If you do not possess an API key for Open AI, you can proceed by following the guidelines outlined here. […]

    Like

  3. […] The key to connect to OpenAI API. If you do not possess an API key for Open AI, you can proceed by following the guidelines outlined here. […]

    Like

  4. […] The key to connect to OpenAI API. If you do not possess an API key for Open AI, you can proceed by following the guidelines outlined here. […]

    Like

  5. […] The key to connect to OpenAI API. If you do not possess an API key for Open AI, you can proceed by following the guidelines outlined here. […]

    Like

  6. […] The key to connect to OpenAI API. If you do not possess an API key for Open AI, you can proceed by following the guidelines outlined here. […]

    Like

  7. […] The key to connect to OpenAI API. If you do not possess an API key for Open AI, you can proceed by following the guidelines outlined here. […]

    Like

  8. […] The key to connect to OpenAI API. If you do not possess an API key for Open AI, you can proceed by following the guidelines outlined here. […]

    Like

  9. […] The key to connect to OpenAI API. If you do not possess an API key for Open AI, you can proceed by following the guidelines outlined here. […]

    Like

Leave a Reply