Closed paulyuk closed 8 months ago
Looking at this example, the code is perfectly fine, just it's not modern ASP.NET like.
[FunctionName(nameof(WhoIs))] public static string WhoIs( [HttpTrigger(AuthorizationLevel.Function, Route = "whois/{name}")] HttpRequest req, [TextCompletion("Who is {name}?", Model = "gpt-35-turbo")] TextCompletionResponse response) { return response.Content; }
Suggest changing this in all places to be this instead:
[FunctionName(nameof(WhoIs))] public static IActionResult WhoIsFunction( [HttpTrigger(AuthorizationLevel.Function, Route = "whois/{name}")] HttpRequest req, [TextCompletion("Who is {name}?")] TextCompletionResponse response) { return new OkObjectResult(response.Content); }
@paulyuk , addressed the issue in above PR, closing the issue now.
Looking at this example, the code is perfectly fine, just it's not modern ASP.NET like.
Suggest changing this in all places to be this instead: