Skip to content

[DS 4002] Improve ability for users to configure GenAI model for RAG #1593

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

Merged
merged 4 commits into from
Jul 1, 2025

Conversation

marc-ckl
Copy link

Description

This PR adds support for configuring the AZURE_API_VERSION via the .env file and settings.py, replacing the previously hardcoded value in openai.py.

Additionally, it ensures that the system can switch between Azure OpenAI and OpenAI clients purely through environment variables, without requiring code modifications. This helps support more flexible deployment and testing of various model versions and providers.

Testing and Validation

  • Added AZURE_API_VERSION to .env and verified that the value is read via settings.py.
  • Modified openai.py to use settings.AZURE_API_VERSION dynamically.
  • Validated that Azure OpenAI client is correctly initialized with the configured version.
  • Unset all Azure-related variables and tested with OPENAI_API_KEY and SWIRL_RAG_MODEL=gpt-4o to confirm OpenAI client works as expected.

Type of Change

[ x ] Bug fix or other non-breaking change that addresses an issue
[ x ] New Feature / Enhancement (non-breaking change that add or improves functionality)

@marc-ckl marc-ckl requested review from dnicodemus and erikspears May 27, 2025 11:06
Copy link

github-actions bot commented May 27, 2025

Test Results

67 tests   67 ✅  33s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 97bccfb.

♻️ This comment has been updated with latest results.

@marc-ckl marc-ckl self-assigned this May 27, 2025
@marc-ckl marc-ckl added the enhancement New feature or request label May 27, 2025
@erikspears erikspears merged commit 93b6e06 into develop Jul 1, 2025
3 checks passed
@erikspears erikspears deleted the DS_4002_configure_genai_model_for_rag branch July 1, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants