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

Use OpenAI REST API #144

Merged
merged 8 commits into from
Jul 23, 2024
Merged

Use OpenAI REST API #144

merged 8 commits into from
Jul 23, 2024

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jul 23, 2024

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

This PR updates the ultralytics/actions to simplify the use of OpenAI and Azure OpenAI services in GitHub Actions.

πŸ“Š Key Changes

  • Removed the REPO_NAME environment setting.
  • Updated to install requests instead of both openai and requests via pip.
  • Refined the function handling OpenAI and Azure OpenAI client initialization.
  • Enhanced the API request method for obtaining completion results using either the OpenAI Python client or REST API.
  • Updated environmental variable settings to streamline the differentiation between OpenAI and Azure OpenAI usage.

🎯 Purpose & Impact

  • Simplicity: Reduces code complexity by removing unnecessary dependencies and environment variables.
  • Consistency: Ensures uniform implementation when switching between OpenAI and Azure OpenAI services.
  • Efficiency: Streamlined requests to the OpenAI API potentially improves performance and maintainability.
  • Flexibility: Allows dynamic handling of both OpenAI and Azure OpenAI services without complex configurations.

Overall, these changes aim to make the GitHub Actions for generating PR summaries and auto-labeling issues more efficient and easier to maintain.

@UltralyticsAssistant UltralyticsAssistant added dependencies Dependencies and packages enhancement New feature or request labels Jul 23, 2024
@glenn-jocher glenn-jocher merged commit 5dd7f1f into main Jul 23, 2024
4 checks passed
@glenn-jocher glenn-jocher deleted the rest-api branch July 23, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Dependencies and packages enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants