diff --git a/.gitignore b/.gitignore index 58781e3e7..72989a953 100644 --- a/.gitignore +++ b/.gitignore @@ -161,4 +161,7 @@ cython_debug/ node_modules/ -.DS_Store \ No newline at end of file +.DS_Store + +# downloaded stuff for 08-building-search-applications +08-building-search-applications/scripts/transcripts_the_ai_show/ diff --git a/09-building-image-applications/README.md b/09-building-image-applications/README.md index 215b015b8..31f1e68c1 100644 --- a/09-building-image-applications/README.md +++ b/09-building-image-applications/README.md @@ -161,7 +161,7 @@ So what does it take to build an image generation application? You need the foll image.show() # catch exceptions - except openai.error.InvalidRequestError as err: + except openai.InvalidRequestError as err: print(err) ``` @@ -454,7 +454,7 @@ try: image.show() # catch exceptions -except openai.error.InvalidRequestError as err: +except openai.InvalidRequestError as err: print(err) ``` diff --git a/09-building-image-applications/python/aoai-app-variation.py b/09-building-image-applications/python/aoai-app-variation.py index f4345d34c..19508305d 100644 --- a/09-building-image-applications/python/aoai-app-variation.py +++ b/09-building-image-applications/python/aoai-app-variation.py @@ -49,7 +49,7 @@ # Display the image in the default image viewer image = Image.open(image_path) image.show() -#except openai.error.InvalidRequestError as err: +#except openai.InvalidRequestError as err: # print(err) finally: diff --git a/09-building-image-applications/python/aoai-assignment.ipynb b/09-building-image-applications/python/aoai-assignment.ipynb index 52714f289..b32c4442f 100644 --- a/09-building-image-applications/python/aoai-assignment.ipynb +++ b/09-building-image-applications/python/aoai-assignment.ipynb @@ -200,7 +200,7 @@ " image.show()\n", " \n", " # catch exceptions\n", - " except openai.error.InvalidRequestError as err:\n", + " except openai.InvalidRequestError as err:\n", " print(err)\n", "\n", " ```\n", diff --git a/09-building-image-applications/python/oai-app-variation.py b/09-building-image-applications/python/oai-app-variation.py index fb07f6d46..ac172ab72 100644 --- a/09-building-image-applications/python/oai-app-variation.py +++ b/09-building-image-applications/python/oai-app-variation.py @@ -35,5 +35,5 @@ # Display the image in the default image viewer image = Image.open(image_path) image.show() -except openai.error.InvalidRequestError as err: +except openai.InvalidRequestError as err: print(err) \ No newline at end of file diff --git a/09-building-image-applications/python/oai-app.py b/09-building-image-applications/python/oai-app.py index d3206cb3f..59aa7c79e 100644 --- a/09-building-image-applications/python/oai-app.py +++ b/09-building-image-applications/python/oai-app.py @@ -6,7 +6,6 @@ # import dotenv dotenv.load_dotenv() - client = OpenAI() @@ -42,7 +41,7 @@ image.show() # catch exceptions -except client.error.InvalidRequestError as err: +except openai.InvalidRequestError as err: print(err) # ---creating variation below--- diff --git a/09-building-image-applications/translations/cn/README.md b/09-building-image-applications/translations/cn/README.md index 7f291ed7f..881112937 100644 --- a/09-building-image-applications/translations/cn/README.md +++ b/09-building-image-applications/translations/cn/README.md @@ -163,7 +163,7 @@ _图片来源维基百科,图片由 Midjourney 生成_ image.show() # catch exceptions - except openai.error.InvalidRequestError as err: + except openai.InvalidRequestError as err: print(err) ``` @@ -458,7 +458,7 @@ try: image.show() # catch exceptions -except openai.error.InvalidRequestError as err: +except openai.InvalidRequestError as err: print(err) ``` diff --git a/09-building-image-applications/translations/ja-jp/README.md b/09-building-image-applications/translations/ja-jp/README.md index 174690647..0b23ed95a 100644 --- a/09-building-image-applications/translations/ja-jp/README.md +++ b/09-building-image-applications/translations/ja-jp/README.md @@ -160,7 +160,7 @@ _Image cred Wikipedia, image generated by Midjourney_ image.show() # 例外をキャッチ - except openai.error.InvalidRequestError as err: + except openai.InvalidRequestError as err: print(err) ``` @@ -454,7 +454,7 @@ try: image.show() # 例外をキャッチ -except openai.error.InvalidRequestError as err: +except openai.InvalidRequestError as err: print(err) ``` diff --git a/09-building-image-applications/translations/ko/README.md b/09-building-image-applications/translations/ko/README.md index 5eebe3843..64fb53c47 100644 --- a/09-building-image-applications/translations/ko/README.md +++ b/09-building-image-applications/translations/ko/README.md @@ -162,7 +162,7 @@ _자기회귀 트랜스포머 (autoregressive transformer)_ 는 모델이 텍스 image.show() # 예외 처리 - except openai.error.InvalidRequestError as err: + except openai.InvalidRequestError as err: print(err) ``` @@ -446,7 +446,7 @@ try: image.show() # 예외 처리 -except openai.error.InvalidRequestError as err: +except openai.InvalidRequestError as err: print(err) ``` diff --git a/09-building-image-applications/translations/pt-br/README.md b/09-building-image-applications/translations/pt-br/README.md index 023b53851..72b3ece9d 100644 --- a/09-building-image-applications/translations/pt-br/README.md +++ b/09-building-image-applications/translations/pt-br/README.md @@ -195,7 +195,7 @@ Então, o que é necessário para construir um aplicativo de geração de imagen image.show() # catch exceptions - except openai.error.InvalidRequestError as err: + except openai.InvalidRequestError as err: print(err) ``` @@ -493,7 +493,7 @@ try: image.show() # catch exceptions -except openai.error.InvalidRequestError as err: +except openai.InvalidRequestError as err: print(err) ``` diff --git a/09-building-image-applications/translations/tw/README.md b/09-building-image-applications/translations/tw/README.md index 3a64dff9e..344304a48 100644 --- a/09-building-image-applications/translations/tw/README.md +++ b/09-building-image-applications/translations/tw/README.md @@ -161,7 +161,7 @@ _圖片來源 Wikipedia, 圖片由 Midjourney 生成_ image.show() # 捕捉異常 - except openai.error.InvalidRequestError as err: + except openai.InvalidRequestError as err: print(err) ``` @@ -454,7 +454,7 @@ try: image.show() # 捕捉異常 -except openai.error.InvalidRequestError as err: +except openai.InvalidRequestError as err: print(err) ```