This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "System.Net.Http" | |
using System.Net.Http; | |
using System.Text; | |
using Newtonsoft.Json.Linq; | |
// You need to signin to https://platform.openai.com/ and create an API key for your profile then paste that key | |
// into the apiKey constant below | |
const string apiKey = "YOUR API KEY HERE"; | |
const string uri = "https://api.openai.com/v1/completions"; | |
const string question = "Explain the following calculation in a few sentences in simple business terms without using DAX function names:\n\n"; |