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)
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)