哪bubu

Error in calling OpenAI

Programming


Hi all, I tried using the openai library for analyzing news data, but it returns error "unsupported_country_region_territory"
How can I fix it? 
 
Duval LC
Algogene has servers across different regions. When you start a backtest on the platform, the task will be assigned to a random server to execute. As OpenAI has access restrictions for some regions (eg. Hong Kong), that's why you will see that error if your task is assigned to run in restricted regions.
 
Duval LC
Original Posted by - b'Duval LC': Algogene has servers across different regions. When you start a backtest on the platform, the task will be assigned to a random server to execute. As OpenAI has access restrictions for some regions (eg. Hong Kong), that's why you will see that error if your task is assigned to run in restricted regions.
To solve this, you can simply add a proxy when you call OpenAI. Details can refer to their github doc (https://github.com/openai/openai-python)
 
哪bubu
Original Posted by - b'Duval LC': To solve this, you can simply add a proxy when you call OpenAI. Details can refer to their github doc (https://github.com/openai/openai-python)
Hi Duval, where can I get the proxy from openai?
 
Money
Original Posted by - b'\xe5\x93\xaabubu':
Hi Duval, where can I get the proxy from openai?
You need to buy it. There are many network providers offering proxy servers.