MetaGLM / zhipuai-sdk-python-v4

MIT License
163 stars 20 forks source link

为什么文档中异常处理要调用OpenAI? #11

Closed hanlintao closed 5 months ago

hanlintao commented 8 months ago

import openai from openai import OpenAI

client = OpenAI()

try: client.fine_tunes.create( training_file="file-XGinujblHPwGLSztz8cPS8XY", ) except openai.APIConnectionError as e: print("The server could not be reached") print(e.cause) # an underlying Exception, likely raised within httpx. except openai.RateLimitError as e: print("A 429 status code was received; we should back off a bit.") except openai.APIStatusError as e: print("Another non-200-range status code was received") print(e.status_code) print(e.response)

zRzRzRzRzRzRzR commented 7 months ago

什么?

glide-the commented 5 months ago

readme中存在的openai的调用示例,是由于开发人员的疏忽