question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Access denied: The request is not authorized, HTTP status: 401

See original GitHub issue

when 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:closed
  • Created 4 months ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
MikeYeagercommented, May 12, 2023

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.

1reaction
ShaoHanscommented, May 12, 2023

@ShaoHans , sorry you ran into this. The AddOpenAITextCompletionService changed during latest package. We are working on a process to call out breaking changes so you will know between nuget releases what is new and what has changed. @shawncal

yes, the AddOpenAITextCompletionService parameter order has changed on 0.13.442.1-preview version , but it’s difficult found @MikeYeager @RickGoGo @yaohaizh @Pelias2525 image

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is “401 Error Unauthorized Access" and How to Fix it?
The HTTP status code “401 Unauthorized Access” is a client-side error, which indicates that the website's server sends a “WWW-Authenticate” header response ...
Read more >
How to Quickly Fix the 401 Unauthorized Error (5 Methods)
The 401 (Unauthorized) status code indicates that the request has not been applied because it lacks valid authentication credentials for the ...
Read more >
What Is a 401 Unauthorized Error and How Do You Fix It?
The 401 Unauthorized error is an HTTP status code that means the page you were trying to access cannot be loaded until you...
Read more >
401 Unauthorized - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 401 Unauthorized response status code indicates that the client request has not been completed ...
Read more >
401-Unauthorized-Access is denied due to invalid ...
This error typically occurs when authentication is not configured correctly between the Microsoft Dynamics NAV Web Server components (Microsoft ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found