为啥我用始皇的api有时需要代理才能连上

前一段时间不用代理,国内网就能连上,但最近两天又不行辽,跟我的IP有关吗?我用的是云南移动。

代码如下:

import os
from openai import OpenAI

os.environ[‘OPENAI_API_KEY’] = ‘xxx’
os.environ[‘OPENAI_BASE_URL’] = ‘https://api.oaipro.com/v1
client = OpenAI()

stream = client.chat.completions.create(
model=“gpt-3.5-turbo”,
messages=[{“role”: “user”, “content”: “Say this is a test”}],
stream=True,
)
for chunk in stream:
if chunk.choices[0].delta.content is not None:
print(chunk.choices[0].delta.content, end=“”)

报错信息:openai.PermissionDeniedError: Just a moment…(省略)

Just a moment 说明有盾,这不是国内的表现。你梯子是什么国家的?

1 个赞

我用的印度的,诶我把代理软件关了就好耶

1 个赞

被CF拦了

From 快问快答 to 开发调优