Skip to content

Commit c9fbf41

Browse files
authored
INTPYTHON-667 Migrate to use Azure OpenAI (#84)
1 parent 7d31c8b commit c9fbf41

File tree

9 files changed

+52
-47
lines changed

9 files changed

+52
-47
lines changed

.evergreen/config.yml

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -306,28 +306,30 @@ buildvariants:
306306
- name: test-langgraph-python-remote
307307
batchtime: 10080 # 1 week
308308

309-
- name: test-chatgpt-retrieval-plugin-rhel
310-
display_name: ChatGPT Retrieval Plugin
311-
expansions:
312-
DIR: chatgpt-retrieval-plugin
313-
run_on:
314-
- rhel87-small
315-
tasks:
316-
- name: test-chatgpt-retrieval-plugin-local
317-
- name: test-chatgpt-retrieval-plugin-remote
318-
batchtime: 10080 # 1 week
319-
320-
- name: test-llama-index-vectorstore-rhel
321-
display_name: LlamaIndex RHEL Vector Store
322-
expansions:
323-
DIR: llama-index-python-vectorstore
324-
run_on:
325-
- rhel87-small
326-
tasks:
327-
- name: test-llama-index-local
328-
# TODO: INTPYTHON-440
329-
# - name: test-llama-index-remote
330-
# batchtime: 10080 # 1 week
309+
# TODO: INTPYTHON-668
310+
# - name: test-chatgpt-retrieval-plugin-rhel
311+
# display_name: ChatGPT Retrieval Plugin
312+
# expansions:
313+
# DIR: chatgpt-retrieval-plugin
314+
# run_on:
315+
# - rhel87-small
316+
# tasks:
317+
# - name: test-chatgpt-retrieval-plugin-local
318+
# - name: test-chatgpt-retrieval-plugin-remote
319+
# batchtime: 10080 # 1 week
320+
321+
# TODO: INTPYTHON-669
322+
# - name: test-llama-index-vectorstore-rhel
323+
# display_name: LlamaIndex RHEL Vector Store
324+
# expansions:
325+
# DIR: llama-index-python-vectorstore
326+
# run_on:
327+
# - rhel87-small
328+
# tasks:
329+
# - name: test-llama-index-local
330+
# # TODO: INTPYTHON-440
331+
# # - name: test-llama-index-remote
332+
# # batchtime: 10080 # 1 week
331333

332334
- name: test-docarray-rhel
333335
display_name: DocArray RHEL
@@ -380,12 +382,13 @@ buildvariants:
380382
tasks:
381383
- name: test-langchaingo-local
382384

383-
- name: test-langchain-js-ubuntu
384-
display_name: LangchainJS Ubuntu2204
385-
expansions:
386-
DIR: langchain-js
387-
run_on:
388-
- ubuntu2204-small
389-
tasks:
390-
- name: test-langchain-js-local
391-
- name: test-langchain-js-remote
385+
# TODO: INTPYTHON-667
386+
# - name: test-langchain-js-ubuntu
387+
# display_name: LangchainJS Ubuntu2204
388+
# expansions:
389+
# DIR: langchain-js
390+
# run_on:
391+
# - ubuntu2204-small
392+
# tasks:
393+
# - name: test-langchain-js-local
394+
# - name: test-langchain-js-remote

.evergreen/execute-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ set -eu
55
SCRIPT_DIR=$(realpath "$(dirname ${BASH_SOURCE[0]})")
66
ROOT_DIR=$(dirname $SCRIPT_DIR)
77

8-
98
# Source the configuration.
109
cd ${ROOT_DIR}/${DIR}
1110
set -a
1211
source config.env
1312
set +a
1413

1514
cd ${REPO_NAME}
15+
1616
bash ${ROOT_DIR}/${DIR}/run.sh

.evergreen/provision-atlas.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ source secrets-export.sh
1818

1919
# Create the env file
2020
echo "export VOYAGEAI_S3_BUCKET=$VOYAGEAI_S3_BUCKET" >> env.sh
21-
echo "export OPENAI_API_KEY=$OPENAI_API_KEY" >> env.sh
21+
echo "export AZURE_OPENAI_ENDPOINT=$AZURE_OPENAI_ENDPOINT" >> env.sh
22+
echo "export AZURE_OPENAI_API_KEY=$AZURE_OPENAI_API_KEY" >> env.sh
23+
echo "export OPENAI_API_VERSION=$OPENAI_API_VERSION" >> env.sh
2224
echo "export MONGODB_URI=$CONN_STRING" >> env.sh
2325
echo "export VOYAGEAI_API_KEY=$VOYAGEAI_API_KEY" >> env.sh

.evergreen/setup-remote.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ export MONGODB_URI
5353

5454
# Create the env file
5555
echo "export VOYAGEAI_S3_BUCKET=$VOYAGEAI_S3_BUCKET" >> env.sh
56+
echo "export AZURE_OPENAI_ENDPOINT=$AZURE_OPENAI_ENDPOINT" >> env.sh
57+
echo "export AZURE_OPENAI_API_KEY=$AZURE_OPENAI_API_KEY" >> env.sh
58+
echo "export OPENAI_API_VERSION=$OPENAI_API_VERSION" >> env.sh
59+
echo "export MONGODB_URI=$CONN_STRING" >> env.sh
5660
echo "export VOYAGEAI_API_KEY=$VOYAGEAI_API_KEY" >> env.sh
57-
echo "export OPENAI_API_KEY=$OPENAI_API_KEY" >> env.sh
58-
echo "export MONGODB_URI=$MONGODB_URI" >> env.sh
5961

6062
# Ensure the remote database is populated.
6163
. .evergreen/utils.sh

langchain-python/config.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
REPO_NAME=langchain-mongodb
22
REPO_ORG=langchain-ai
33
DATABASE=langchain_test_db
4+
REPO_ORG=blink1073
5+
REPO_BRANCH=INTPYTHON-667

langchain-python/run.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ pip install uv rust-just
2222

2323
just install
2424

25-
export MONGODB_URI=$MONGODB_URI
26-
export OPENAI_API_KEY=$OPENAI_API_KEY
27-
28-
just tests
25+
just unit_tests
2926

3027
just integration_tests

langgraph-python/config.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
REPO_NAME=langchain-mongodb
22
REPO_ORG=langchain-ai
33
DATABASE=langgraph-test
4+
REPO_ORG=blink1073
5+
REPO_BRANCH=INTPYTHON-667

langgraph-python/run.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ pip install uv rust-just
2222

2323
just install
2424

25-
export MONGODB_URI=$MONGODB_URI
26-
export OPENAI_API_KEY=$OPENAI_API_KEY
27-
28-
just tests
25+
just unit_tests
2926

3027
just integration_tests

semantic-kernel-python/run.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ make install-pre-commit
2727
cp $SCRIPT_DIR/test_mongodb_atlas_memory_store.py .
2828

2929
# shellcheck disable=SC2154
30-
OPENAI_API_KEY="$OPENAI_API_KEY" \
30+
OPENAI_API_KEY="" \
3131
OPENAI_ORG_ID="" \
3232
AZURE_OPENAI_DEPLOYMENT_NAME="" \
3333
AZURE_OPENAI_ENDPOINT="" \
3434
AZURE_OPENAI_API_KEY="" \
3535
MONGODB_ATLAS_CONNECTION_STRING=$MONGODB_URI \
3636
Python_Integration_Tests=1 \
37-
uv run pytest test_mongodb_atlas_memory_store.py -k test_collection_knn
37+
uv run pytest -rav test_mongodb_atlas_memory_store.py -k test_collection_knn
3838

3939
# shellcheck disable=SC2154
40-
OPENAI_API_KEY="$OPENAI_API_KEY" \
40+
OPENAI_API_KEY="" \
4141
OPENAI_ORG_ID="" \
4242
AZURE_OPENAI_DEPLOYMENT_NAME="" \
4343
AZURE_OPENAI_ENDPOINT="" \
4444
AZURE_OPENAI_API_KEY="" \
4545
MONGODB_ATLAS_CONNECTION_STRING=$MONGODB_URI \
4646
Python_Integration_Tests=1 \
47-
uv run pytest test_mongodb_atlas_memory_store.py
47+
uv run pytest -rav test_mongodb_atlas_memory_store.py

0 commit comments

Comments
 (0)