Error: Access denied: The request is not authorized, HTTP status: 401
See original GitHub issuewhen I upgrade the Microsoft.SemanticKernel from 0.13.277.1-preview to 0.13.442.1-preview , the samples which I write two weeks ago cannot work , it said : ### Error: Access denied: The request is not authorized, HTTP status: 401。But when I use 0.13.442.1-preview,the samples can work very well ,what happen ? the code is below: ` await Console.Out.WriteLineAsync(“please input your OpenAI key …”); var key = Console.ReadLine(); var sk = Kernel.Builder.Build(); sk.Config.AddOpenAITextCompletionService(“OpenAI_davinci”, “text-davinci-003”, key!);
string summarizeBlurbFlex = “”" Summarize the following text in two sentences or less. —begin text— {{$INPUT}} —end text— “”";
var mySummarizeFunction = sk.CreateSemanticFunction(summarizeBlurbFlex, maxTokens: 1000); var myOutput = await mySummarizeFunction.InvokeAsync(“a long text …”); Console.WriteLine(myOutput); `
Issue Analytics
- State:
- Created 4 months ago
- Comments:7
Top GitHub Comments
Thank you. That was the issue for me. I didn’t even notice it. Removing the first (now unnecessary) parameter from the call fixed it for me.
yes, the AddOpenAITextCompletionService parameter order has changed on 0.13.442.1-preview version , but it’s difficult found @MikeYeager @RickGoGo @yaohaizh @Pelias2525