Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking openai library update in 09-building-image-applications #544

Closed
bmerkle opened this issue Jul 31, 2024 · 2 comments
Closed

breaking openai library update in 09-building-image-applications #544

bmerkle opened this issue Jul 31, 2024 · 2 comments
Assignees

Comments

@bmerkle
Copy link
Contributor

bmerkle commented Jul 31, 2024

Describe the bug
There are some breaking changes in openai library between version 0.28.x and version 1.x.
In sample 09-building-image-applications the requirements.txt does not specify any version.
Using pip pulls the most recent openai library (aka some 1.x version)
However the python code is still on version 0.28.x which results in invalid code.

The pull request fixes the python code and documentation:

  • rename of openai.error.InvalidRequestError into openai.InvalidRequestError

To Reproduce
Steps to reproduce the behavior:

  1. sample 09-building-image-applications
  2. install python libraries via pip
  3. open python files, shows invalid code

Expected behavior
Code, documentation and libraries shall be in sync.

Copy link

👋 Thanks for contributing @bmerkle! We will review the issue and get back to you soon.

@koreyspace
Copy link
Collaborator

Thanks for the fix @bmerkle , in review!

@github-actions github-actions bot locked and limited conversation to collaborators Aug 29, 2024
brucedkyle added a commit to brucedkyle/generative-ai-for-beginners that referenced this issue Sep 21, 2024
* Add zh-tw translations

* Update README.md

Revised the README by editing some grammatical errors and added a key terms section for easier beginner-friendly readability.

* Bump braces

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Edit tracking code to ?WT.mc_id=academic-105485-koreyst

* fix typo in llm comparison readme

* fix typos

* Fixing grammer of readme.md for 3rd section

* Fixing path and adding openai notebook for module 11

* Fixing Readme.md

* Fixing korean readme.md for broken links

* Fixed a typo in aoai-assignment.ipynb

replaced AZURE_OPENAI_KEY env variable with AZURE_OPENAI_API_KEY

* Fix broken table markdown in ko

* Fix README.md Fix spelling errors

* .gitignore should ignore downloaded files of sample 08-building-search-applications microsoft#536

* Bump braces in /08-building-search-applications/typescript/search-app

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix microsoft#544: upgrade openai library from version 0.28 to version 1.x.

* Update 09-building-image-applications/README.md

Just fix some markdown annotations

* add Github Models solution for exercise

* Update githubmodels-assignment.ipynb

add tracking links

* Update githubmodels-assignment.ipynb

add tracking to images

* fix broken paths

* fix paths tracking

* fix broken urls

* fix broken url

* Update README.md

Adding link to Github Models

* Update README.md (ja-jp:Overtranslation "Code: コード:"→"Code:")

https://github.com/microsoft/generative-ai-for-beginners/blob/main/translations/ja-jp/README.md
#PingMSFTDocs

* fix typos

* fix typos

* fix typos

* fix typo

* 06, added githubmodels-app.py, updated githubmodels-assignment.ipynb

* fx: pt-BR translation README.md

Fix the pt-BR translation of Table of contens on README.md

* Update README.md (Typo "Open AI"→"OpenAI")

https://microsoft.github.io/generative-ai-for-beginners/#/04-prompt-engineering-fundamentals/README
https://github.com/microsoft/generative-ai-for-beginners/blob/main/04-prompt-engineering-fundamentals/README.md
#PingMSFTDocs

* fix: cn translation typo

* updated requirements.txt

* added githubmodels-assignment.ipynb

* added 07-building-chat-applications/python/githubmodels-assignment.ipynb

* added githubmodels-assignment-simple.ipynb

* removed url

* correct documentation

* Bump axios

Bumps [axios](https://github.com/axios/axios) from 1.6.5 to 1.7.4.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.6.5...v1.7.4)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix#542: unified environment handling with other samples.
Always load .env file and not rely on env-variable only.
Added prepare_transcript_ai_show scripts for powershell and cmd

* Fix#540: Renamed AZURE_OPENAI_KEY to  AZURE_OPENAI_API_KEY to use a consistent naming schema

* Fix#540: Renamed AZURE_OPENAI_KEY to AZURE_OPENAI_API_KEY to use a consistent naming schema

* Fix#540: Renamed AZURE_OPENAI_KEY to AZURE_OPENAI_API_KEY to use a consistent naming schema

* Fix#540: Renamed AZURE_OPENAI_KEY to AZURE_OPENAI_API_KEY to use a consistent naming schema

* Fix#540: Renamed AZURE_OPENAI_KEY to AZURE_OPENAI_API_KEY to use a consistent naming schema

* Fix#540: Renamed AZURE_OPENAI_KEY to AZURE_OPENAI_API_KEY to use a consistent naming schema

* Fix#540: Renamed AZURE_OPENAI_KEY to AZURE_OPENAI_API_KEY to use a consistent naming schema

* Fix#540: Renamed AZURE_OPENAI_KEY to AZURE_OPENAI_API_KEY to use a consistent naming schema

* fix for microsoft#574

use new API version '2023-05-01 parameters

* fix for microsoft#574

use new API version '2023-05-01 parameters

* fix for microsoft#574

use new API version '2023-05-01 parameters

* fix for microsoft#574

use new API version '2023-05-01 parameters

* fix for microsoft#574

use new API version '2023-05-01 parameters

* fix for microsoft#574

use new API version '2023-05-01 parameters

* Fix#542: improve PS Script, Move-Item -Force if file is already there

* fix issue 587: list index out of range

* documentation improvements for githubmodels-assignment.ipynb
fix#589

* removed copilot generated cell

* reverted metadatachanges

* Bump braces

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* recipe-testjs

* added an app.js for lesson 6

* added the chat appilication lesson

* adding search applications app

* added function calling gh models lesson

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Will <[email protected]>
Co-authored-by: Whitegabriella789 <[email protected]>
Co-authored-by: Korey Stegared-Pace <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jack White <[email protected]>
Co-authored-by: Rohith Raj Srinivasan <[email protected]>
Co-authored-by: Inderpreet Singh <[email protected]>
Co-authored-by: Denis Kyashif <[email protected]>
Co-authored-by: Jay Park <[email protected]>
Co-authored-by: JianChuanting <[email protected]>
Co-authored-by: bmerkle <[email protected]>
Co-authored-by: gameliee <[email protected]>
Co-authored-by: Amy Boyd <[email protected]>
Co-authored-by: John Aziz <[email protected]>
Co-authored-by: Lee Stott <[email protected]>
Co-authored-by: Hiroshi Yoshioka <[email protected]>
Co-authored-by: omahs <[email protected]>
Co-authored-by: Dragon <[email protected]>
Co-authored-by: Lucas Menezes <[email protected]>
Co-authored-by: Anx <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants