-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Description
the limit is 100/hour i want to use it like for atleast 10k requests/reponse per day
the script i am using: import g4f
This prompt will be used for all model attempts
prompt = "Write a short poem about a rainy day."
A list of models to try
models_to_test = [
"gpt-4",
""
]
for model_name in models_to_test:
try:
print(f"Attempting to get a response using model: {model_name}...")
response = g4f.ChatCompletion.create(
model=model_name,
messages=[{"role": "user", "content": prompt}],
)
print(f"Successful response from {model_name}:\n{response}\n")
except Exception as e:
print(f"Failed to get a response for model {model_name}. Error: {e}\n")
AND THIS
import asyncio
import warnings
from g4f.client import Client
Suppress specific warnings
warnings.filterwarnings("ignore", category=RuntimeWarning, module="curl_cffi.aio")
warnings.filterwarnings("ignore", category=UserWarning, module="asyncio.events")
Set WindowsSelectorEventLoopPolicy to avoid Proactor event loop warning
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
Initialize the client
client = Client()
Make the API call
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "Hello, how are you"}],
web_search=False
)
Print the response
print(response.choices[0].message.content)
and the error is this: 该ip请求过多已被暂时限流 过两分钟再试试吧(目前限制了每小时60次 正常人完全够用,学校网络和公司网络等同网络下共用额度,如果限制了可以尝试切换网络使用 ),本网站正版地址是 如果你在其他网站遇到此报错,请访问 ,如果你已经在本网站,请关闭代理,不要使用公共网络访问,如需合作接口调用请联系微信kelemm220 或者前往 注册使用(可付费使用gpt4 注册可免费使用3.5)
translation in english: This IP has been temporarily restricted due to excessive requests. Please try again in two minutes (currently limited to 60 requests per hour, which is sufficient for normal people. School and company networks share the same quota. If restricted, you can try switching networks). The official address of this website is . If you encounter this error on other websites, please visit . If you are already on this website, please turn off the proxy and do not use public network access. If you need to cooperate with the interface call, please contact WeChat kelemm220 or go to register for use (you can pay to use gpt4 and register for free to use 3.5)