Open agn-7 opened 6 months ago
I also checked the inspect->console and I saw the following error as well:
Refused to set unsafe header "User-Agent"
Then I came up with the issue via the following code changes:
// const openai = new OpenAIApi(
// new Configuration({
// apiKey: key,
// })
// );
// This hardcodes insertion of 'User-Agent'
let config = new Configuration({ apiKey: key,});
delete config.baseOptions.headers['User-Agent'];
const openai = new OpenAIApi(config);
But still, the maximum token issue exists from openai API response with status 400!
I wanted to test this extension on my local, however, I encountered the following error!
I also test with the different current pages like google, bing, github, etc.