Token to request ChatGPT thru a proxy #183
-
A request to ChatGPT thru the proxy discord.pawan doesn't work. the token prefix To check, a brutal action by removing the 5 first characters has corrected the issue. headers.Add("Authorization", Rest.GetBearerOAuthToken(Authentication.Info.ApiKey.Substring(5))); Perhaps, there is something more cleverly to correct. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
I designed the proxy service to reflect a session token based mechanism similar to the one openAI uses for chat gpt. More info here https://github.com/RageAgainstThePixel/OpenAI-DotNet/blob/main/OpenAI-DotNet-Proxy/Readme.md If this is a proxy service you control, I'd prefer you use the |
Beta Was this translation helpful? Give feedback.
-
it's a good practice, sk- for chatGpt, pk- for pawan. |
Beta Was this translation helpful? Give feedback.
-
In OpenAIClient.cs we have this check:
So only key starting with sess- or sk- are authorized. |
Beta Was this translation helpful? Give feedback.
-
Finally, Pawan proxy seems accept prefix like sess-pk- |
Beta Was this translation helpful? Give feedback.
@ThierryBachmann Checkout the latest release. #185