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.
PR Feedback (click)
Description
This pull request includes changes to the
src/models.rs
file. The changes involve modifying thecreate
method in theOpenAIClientManager
struct. The changes are aimed at improving the connection to OpenAI via theOPENAI_API_BASE
environment variable.Summary
create
method in theOpenAIClientManager
struct insrc/models.rs
.OPENAI_API_BASE
environment variable.OPENAI_API_BASE
environment variable.OPENAI_API_BASE
environment variable is present, the OpenAI client is configured with the specified API base.OPENAI_API_BASE
environment variable is not present, the OpenAI client falls back to the previous implementation.AZURE_API_KEY
,AZURE_DEPLOYMENT_ID
,AZURE_DEPLOYMENT_ID_ADA
,AZURE_API_BASE
) are present.Fixes #108.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: