In this article, you will learn how to integrate with Chat-GPT in C# using .Net core. Prerequisites Have an account with OpenAI platform. CREATE A NEW PROJECT Let’s get started. Launch your IDE and create a new project. Select ASP.Net Core Web API....
Markdown supported · ⌘↵ to post
Joseph Handschu
Well, this is a great intro to the integration however when I tried to run it is missing a complete class. The ADGenerateRequestModel is not where to be found. Is there a GIT or any follow up to this article?
public async Task> GenerateContent(ADGenerateRequestModel generateRequestModel) { var apiKey = _configuration.GetSection("Appsettings:GChatAPIKEY").Value; var apiModel = _configuration.GetSection("Appsettings:Model").Value; List rq = new List(); string rs = ""; OpenAIAPI api = new OpenAIAPI(new APIAuthentication(apiKey)); var completionRequest = new OpenAI_API.Completions.CompletionRequest() {