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

Sweep: Connection to openai via OPENAI_API_BASE doesn't seem to work (βœ“ Sandbox Passed) #109

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Jan 29, 2024

PR Feedback (click)

  • πŸ‘ Sweep Did Well
  • πŸ‘Ž Sweep Needs Improvement

Description

This pull request includes changes to the src/models.rs file. The changes involve modifying the create method in the OpenAIClientManager struct. The changes are aimed at improving the connection to OpenAI via the OPENAI_API_BASE environment variable.

Summary

  • Modified the create method in the OpenAIClientManager struct in src/models.rs.
  • Added support for the OPENAI_API_BASE environment variable.
  • Replaced the previous implementation with a conditional check for the presence of the OPENAI_API_BASE environment variable.
  • If the OPENAI_API_BASE environment variable is present, the OpenAI client is configured with the specified API base.
  • If the OPENAI_API_BASE environment variable is not present, the OpenAI client falls back to the previous implementation.
  • Added support for Azure API configuration if the necessary environment variables (AZURE_API_KEY, AZURE_DEPLOYMENT_ID, AZURE_DEPLOYMENT_ID_ADA, AZURE_API_BASE) are present.
  • Updated the Azure API configuration to use the specified API base, API key, deployment IDs, and API version.
  • Added a fallback option for OpenAI client configuration if the necessary Azure environment variables are not present.

Fixes #108.


πŸŽ‰ Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

πŸ’‘ To get Sweep to edit this pull request, you can:

  • Comment below, and Sweep can edit the entire PR
  • Comment on a file, Sweep will only modify the commented file
  • Edit the original issue to get Sweep to recreate the PR from scratch

Copy link
Contributor Author

sweep-ai bot commented Jan 29, 2024

Rollback Files For Sweep

  • Rollback changes to src/models.rs

This is an automated message generated by Sweep AI.

Copy link
Contributor Author

sweep-ai bot commented Jan 29, 2024

Apply Sweep Rules to your PR?

  • Apply: All docstrings and comments should be up to date.
  • Apply: Do not include large chunks of commented out code.
  • Apply: Ensure that all error logs use traceback during exceptions.
  • Apply: Avoid using import pdb; pdb.set_trace() in production code.
  • Apply: Avoid using debug log or print statements in production code.
  • Apply: Ensure that code is properly formatted and follows consistent styling guidelines.

This is an automated message generated by Sweep AI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep: Connection to openai via OPENAI_API_BASE doesn't seem to work
0 participants