Skip to content

INTPYTHON-667 Migrate to use Azure OpenAI #84

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 13 commits into from
Jul 3, 2025
65 changes: 34 additions & 31 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,28 +306,30 @@ buildvariants:
- name: test-langgraph-python-remote
batchtime: 10080 # 1 week

- name: test-chatgpt-retrieval-plugin-rhel
display_name: ChatGPT Retrieval Plugin
expansions:
DIR: chatgpt-retrieval-plugin
run_on:
- rhel87-small
tasks:
- name: test-chatgpt-retrieval-plugin-local
- name: test-chatgpt-retrieval-plugin-remote
batchtime: 10080 # 1 week

- name: test-llama-index-vectorstore-rhel
display_name: LlamaIndex RHEL Vector Store
expansions:
DIR: llama-index-python-vectorstore
run_on:
- rhel87-small
tasks:
- name: test-llama-index-local
# TODO: INTPYTHON-440
# - name: test-llama-index-remote
# batchtime: 10080 # 1 week
# TODO: INTPYTHON-668
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool to do this too.

# - name: test-chatgpt-retrieval-plugin-rhel
# display_name: ChatGPT Retrieval Plugin
# expansions:
# DIR: chatgpt-retrieval-plugin
# run_on:
# - rhel87-small
# tasks:
# - name: test-chatgpt-retrieval-plugin-local
# - name: test-chatgpt-retrieval-plugin-remote
# batchtime: 10080 # 1 week

# TODO: INTPYTHON-669
# - name: test-llama-index-vectorstore-rhel
# display_name: LlamaIndex RHEL Vector Store
# expansions:
# DIR: llama-index-python-vectorstore
# run_on:
# - rhel87-small
# tasks:
# - name: test-llama-index-local
# # TODO: INTPYTHON-440
# # - name: test-llama-index-remote
# # batchtime: 10080 # 1 week

- name: test-docarray-rhel
display_name: DocArray RHEL
Expand Down Expand Up @@ -380,12 +382,13 @@ buildvariants:
tasks:
- name: test-langchaingo-local

- name: test-langchain-js-ubuntu
display_name: LangchainJS Ubuntu2204
expansions:
DIR: langchain-js
run_on:
- ubuntu2204-small
tasks:
- name: test-langchain-js-local
- name: test-langchain-js-remote
# TODO: INTPYTHON-667
# - name: test-langchain-js-ubuntu
# display_name: LangchainJS Ubuntu2204
# expansions:
# DIR: langchain-js
# run_on:
# - ubuntu2204-small
# tasks:
# - name: test-langchain-js-local
# - name: test-langchain-js-remote
2 changes: 1 addition & 1 deletion .evergreen/execute-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ set -eu
SCRIPT_DIR=$(realpath "$(dirname ${BASH_SOURCE[0]})")
ROOT_DIR=$(dirname $SCRIPT_DIR)


# Source the configuration.
cd ${ROOT_DIR}/${DIR}
set -a
source config.env
set +a

cd ${REPO_NAME}

bash ${ROOT_DIR}/${DIR}/run.sh
4 changes: 3 additions & 1 deletion .evergreen/provision-atlas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ source secrets-export.sh

# Create the env file
echo "export VOYAGEAI_S3_BUCKET=$VOYAGEAI_S3_BUCKET" >> env.sh
echo "export OPENAI_API_KEY=$OPENAI_API_KEY" >> env.sh
echo "export AZURE_OPENAI_ENDPOINT=$AZURE_OPENAI_ENDPOINT" >> env.sh
echo "export AZURE_OPENAI_API_KEY=$AZURE_OPENAI_API_KEY" >> env.sh
echo "export OPENAI_API_VERSION=$OPENAI_API_VERSION" >> env.sh
echo "export MONGODB_URI=$CONN_STRING" >> env.sh
echo "export VOYAGEAI_API_KEY=$VOYAGEAI_API_KEY" >> env.sh
6 changes: 4 additions & 2 deletions .evergreen/setup-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ export MONGODB_URI

# Create the env file
echo "export VOYAGEAI_S3_BUCKET=$VOYAGEAI_S3_BUCKET" >> env.sh
echo "export AZURE_OPENAI_ENDPOINT=$AZURE_OPENAI_ENDPOINT" >> env.sh
echo "export AZURE_OPENAI_API_KEY=$AZURE_OPENAI_API_KEY" >> env.sh
echo "export OPENAI_API_VERSION=$OPENAI_API_VERSION" >> env.sh
echo "export MONGODB_URI=$CONN_STRING" >> env.sh
echo "export VOYAGEAI_API_KEY=$VOYAGEAI_API_KEY" >> env.sh
echo "export OPENAI_API_KEY=$OPENAI_API_KEY" >> env.sh
echo "export MONGODB_URI=$MONGODB_URI" >> env.sh

# Ensure the remote database is populated.
. .evergreen/utils.sh
Expand Down
2 changes: 2 additions & 0 deletions langchain-python/config.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
REPO_NAME=langchain-mongodb
REPO_ORG=langchain-ai
DATABASE=langchain_test_db
REPO_ORG=blink1073
REPO_BRANCH=INTPYTHON-667
5 changes: 1 addition & 4 deletions langchain-python/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ pip install uv rust-just

just install

export MONGODB_URI=$MONGODB_URI
export OPENAI_API_KEY=$OPENAI_API_KEY

just tests
just unit_tests
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we were running integration tests twice? good catch!


just integration_tests
2 changes: 2 additions & 0 deletions langgraph-python/config.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
REPO_NAME=langchain-mongodb
REPO_ORG=langchain-ai
DATABASE=langgraph-test
REPO_ORG=blink1073
REPO_BRANCH=INTPYTHON-667
5 changes: 1 addition & 4 deletions langgraph-python/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ pip install uv rust-just

just install

export MONGODB_URI=$MONGODB_URI
export OPENAI_API_KEY=$OPENAI_API_KEY

just tests
just unit_tests

just integration_tests
8 changes: 4 additions & 4 deletions semantic-kernel-python/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ make install-pre-commit
cp $SCRIPT_DIR/test_mongodb_atlas_memory_store.py .

# shellcheck disable=SC2154
OPENAI_API_KEY="$OPENAI_API_KEY" \
OPENAI_API_KEY="" \
OPENAI_ORG_ID="" \
AZURE_OPENAI_DEPLOYMENT_NAME="" \
AZURE_OPENAI_ENDPOINT="" \
AZURE_OPENAI_API_KEY="" \
MONGODB_ATLAS_CONNECTION_STRING=$MONGODB_URI \
Python_Integration_Tests=1 \
uv run pytest test_mongodb_atlas_memory_store.py -k test_collection_knn
uv run pytest -rav test_mongodb_atlas_memory_store.py -k test_collection_knn

# shellcheck disable=SC2154
OPENAI_API_KEY="$OPENAI_API_KEY" \
OPENAI_API_KEY="" \
OPENAI_ORG_ID="" \
AZURE_OPENAI_DEPLOYMENT_NAME="" \
AZURE_OPENAI_ENDPOINT="" \
AZURE_OPENAI_API_KEY="" \
MONGODB_ATLAS_CONNECTION_STRING=$MONGODB_URI \
Python_Integration_Tests=1 \
uv run pytest test_mongodb_atlas_memory_store.py
uv run pytest -rav test_mongodb_atlas_memory_store.py