-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
chore: Remove openai
directory
#13224
base: main
Are you sure you want to change the base?
Conversation
- Samples are duplicates of `chat_completions` directory
Here is the summary of changes. You are about to delete 6 region tags.
This comment is generated by snippet-bot.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @holtskinner, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
This pull request removes the openai
directory, which contains example code that duplicates the functionality found in the chat_completions
directory. The files removed include examples for chat completions, image-based chat completions (both streaming and non-streaming), a credentials refresher class, and a usage example for the credentials refresher. Additionally, the associated test file, noxfile_config.py
, and requirements files (requirements-test.txt
and requirements.txt
) within the openai
directory are also removed.
Highlights
- Removal of Duplicate Samples: The
openai
directory is removed because its samples are duplicates of those in thechat_completions
directory, reducing redundancy in the codebase. - Clean Up: Associated test files, configuration, and requirements specific to the
openai
directory are also removed to ensure a clean and consistent project structure.
Changelog
Click here to see the changelog
- generative_ai/openai/chat_openai_example.py
- File removed as it duplicates functionality in the
chat_completions
directory.
- File removed as it duplicates functionality in the
- generative_ai/openai/chat_openai_image_example.py
- File removed as it duplicates functionality in the
chat_completions
directory.
- File removed as it duplicates functionality in the
- generative_ai/openai/chat_openai_image_stream_example.py
- File removed as it duplicates functionality in the
chat_completions
directory.
- File removed as it duplicates functionality in the
- generative_ai/openai/chat_openai_stream_example.py
- File removed as it duplicates functionality in the
chat_completions
directory.
- File removed as it duplicates functionality in the
- generative_ai/openai/credentials_refresher_class_example.py
- File removed as it duplicates functionality in the
chat_completions
directory.
- File removed as it duplicates functionality in the
- generative_ai/openai/credentials_refresher_usage_example.py
- File removed as it duplicates functionality in the
chat_completions
directory.
- File removed as it duplicates functionality in the
- generative_ai/openai/noxfile_config.py
- File removed as it is specific to the now-removed
openai
directory.
- File removed as it is specific to the now-removed
- generative_ai/openai/requirements-test.txt
- File removed as it is specific to the now-removed
openai
directory.
- File removed as it is specific to the now-removed
- generative_ai/openai/requirements.txt
- File removed as it is specific to the now-removed
openai
directory.
- File removed as it is specific to the now-removed
- generative_ai/openai/test_openai_examples.py
- File removed as it contains tests for the now-removed
openai
directory.
- File removed as it contains tests for the now-removed
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Trivia time!
What is the primary use case for the nox tool, often used in Python projects?
Click here for the answer
Nox is primarily used for automating testing in multiple Python environments. It can be configured to run tests with different Python versions and dependencies.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request removes the openai
directory, which contains several example files. The description indicates that these samples are duplicates of the chat_completions
directory. This review focuses on ensuring that the removal is intentional and doesn't inadvertently remove necessary functionality or negatively impact documentation.
Summary of Findings
- Removal of OpenAI directory: The pull request removes the
openai
directory, which contains several example files demonstrating how to use the OpenAI API with Vertex AI. This change should be carefully reviewed to ensure that the functionality provided by these examples is either no longer needed or has been migrated to another location. - Potential impact on documentation: The removal of these example files may impact any documentation or tutorials that reference them. It's important to update any relevant documentation to reflect these changes.
Merge Readiness
Given the potential impact on documentation and the need to ensure that the removed functionality is truly redundant, I recommend a thorough review of this pull request before merging. Ensure that all references to the removed files are updated and that the functionality is adequately covered elsewhere. I am unable to approve this pull request, and other reviewers should review and approve this code before merging.
There are active uses of these samples in the documentation (example), as well as multiple references in Samples Browser Is there a plan to deprecate these samples first? Please provide an internal b/ link if so |
Thank you for the clean-up job. As @glasnt mentioned, kindly update the docs to first to remove the dependency. |
Docs were updated in cl/735495479 |
chat_completions
directory