The input is not a valid Base-64 string as it contains a non-base 64 character
Caulm opened this issue · comments
wind commented
An exception is thrown when ChatGptUnofficial.Ask
is called for the second time.
Message:
The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
Stack Trace:
在 System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
在 System.Convert.FromBase64String(String s)
在 ChatGPT.Net.ChatGptUnofficial.ValidateToken(String token) 在 E:\Mirai-console\livebot\source\ChatGPT.Net\ChatGPTUnofficial.cs 中: 第 200 行
在 ChatGPT.Net.ChatGptUnofficial.<SendMessage>d__33.MoveNext() 在 E:\Mirai-console\livebot\source\ChatGPT.Net\ChatGPTUnofficial.cs 中: 第 208 行
在 ChatGPT.Net.ChatGptUnofficial.<Ask>d__30.MoveNext() 在 E:\Mirai-console\livebot\source\ChatGPT.Net\ChatGPTUnofficial.cs 中: 第 147 行
The length of Base64 encoded string tokenParts[1]
is not a multiple of 4. So some '=' are needed to add at the end of the string. (likely to be a flaw in .NET library)