Introducing Open AI's ChatGPT API | Build Power App & use Chat GPT API



Introducing ChatGPT API from OpenAI which is now available for developers to start using. Developers can now integrate ChatGPT into their Power Apps through the new Chat GPT API using gpt-3.5-turbo model.

This ChatGPT API and Microsoft Power Apps step-by-step tutorial video showcases how to build a custom connector that calls OpenAI’s latest ChatGPT API to create custom action that can use gpt-3.5-turbo model within Power Platform (PowerApps). Infact, I will showcase how to create the entire ChatGPT experience directly inside Power Apps!

ChatGPT is a powerful natural language processing API that allows you to generate human-like responses to user input. With a custom connector, you can integrate ChatGPT into Power Platform.
ChatGPT is powered by gpt-3.5-turbo, OpenAI’s most advanced language model.
Using the OpenAI API, you can build your own applications with gpt-3.5-turbo to do things like: Draft an email or other piece of writing, write code, answer questions, create conversational agents, give your software a natural language interface, translate languages & much more.

This guide explains how to make an API call for chat-based language models. Chat models take a series of messages as input and return a model-generated message as output. The chat format is designed to make multi-turn conversations easy.

By the end of this video, you’ll have a good understanding of how to use the ChatGPT API in Power Apps via Custom Connector.

ChatGPT is your friend! ChatGPT is increasing in popularity & with this custom connector implementation we can incorporate it in our Power Apps.

Useful Links:

Open AI Announcement Introducing ChatGPT and Whisper APIs
https://openai.com/blog/introducing-chatgpt-and-whisper-apis

Chat Completions API Guide
https://platform.openai.com/docs/guides/chat

Create Chat Completion API
https://platform.openai.com/docs/api-reference/chat

#ChatGPT #OpenAI #PowerApps #PowerPlatform #GPT #AI

Table of Contents:
00:00 – Introducing Open AI’s ChatGPT API & Integrating with Power Apps
00:37 – New ChatGPT API announcement
02:02 – Create custom connector to leverage ChatGPT API in PowerApps
06:13 – Call Chat GPT API from Power Apps
10:14 – Build Chat GPT experience in Power Apps
11:11 – ChatGPT reusable Component in Power Apps
12:21 – Subscribe to Reza Dorrani channel

🤝 Let’s connect on social:
🔗 Reza Dorrani LinkedIn: https://www.linkedin.com/in/rezadorrani/
🐦 Reza Dorrani Twitter: https://twitter.com/rezadorrani

33 comments
  1. Great video, Reza! Instead of Open AI, I would like to use KnowledgeGPT, i.e. to feed the contents of some internal documents and have the AI answers based on them. I have tried to make different tweaks to your connector as KnowledgeGPT also requires Open AI API key, however, I do not seem to get the desired outcome. Any ideas for the implementation of the KnowledgeGPT connector?

  2. Another great video and subject, Reza! 👍🏽 do you know if there is a way to direct chatgpt to a sharepoint communication site to use it as a knowledge base?

  3. Hi bro, how can i add the Bearer key by default for any user? I got the issue that user have to put the bearer key into connector in the first time they access app

  4. How do i create the collection source?

    Edit: found it out. but now it says a column called content is missing in the formula. But I have a column called content in the collection.

  5. Hi Reza, this is amzing sharing, really thanks for the tutorial. one question is how can we maintain the message history in Power Automate flow? Imagine integrating ChatGPT API flow into MS Teams, when user has create a new message inside the channel, he wants to continue the conversation within that message tab and keep asking. If under other web development process, for example in Python, this can be done easily by using array related '.append' function, but how to achieve that in Power Automate platform?

  6. i'm stuck into creating the conection and inserting the API Key, it just doesn't work but no error is shown, just a red banner for a split second. No matter if I use "Bearer Key" or just "Key"

  7. @Reza Dorrani I stuck in this error while creating the custom connector can you help me ?

    {

    "error": {

    "message": "That model does not exist",

    "type": "invalid_request_error",

    "param": null,

    "code": null

    }

    }

  8. Hi Reza, cool Content, really setup everything but faced one issue while setting our varResponse from Connector: Issue

    Name isn't valid. Textinput1' isn't recognized.

    This error appears most commonly when a formula refers to something that no longer exists (for example, a control that you've deleted).

    Location

    +2 Icon1 OnSelect

    How to fix

    Remove or correct the reference to the name that isn't valid.

    Article: Formula reference for Power Apps

  9. This is a great addition to last week's. Particularly liked the UI enhancements to make it clean and slick and of course, componentising it was super creative. Will take time to see if I can enhance the UI as well. Great Video. Thanks for sharing

  10. Hi Reza Its really amazing . But how we can use this outside power apps or can somebody else use this self created chatbot. If yes then how and is this possible to connect this app with any database. I want to generate insights based on the GDS report using Chatgpt is it possible ?

  11. Hi Reza. Thanks for this great video. I've tried to make exactly what you did, but not getting at all. Errors message are like : Value in ChatAPI are not valid. "Collect" feature contains no valid argument etc… "colChat" is not recognized etc…

    Note that, for some reason, i can't not use "coma". I have to use "Semi coma" instead of "Coma" in my Power Apps.

    Set(varResponse;ChatGPTconnector.ChatAPI("gpt-3.5-turbo";Collect(ColChat;{role:"user" content:TextInput1.Text})));

    Collect (colChat;First(varResponse.choices).message);

    Reset(TextInput1)

Comments are closed.