diff --git a/backend/src/meta_agent/community/retrieve.py b/backend/src/meta_agent/community/retrieve.py index 10c9c8a..686513a 100644 --- a/backend/src/meta_agent/community/retrieve.py +++ b/backend/src/meta_agent/community/retrieve.py @@ -43,9 +43,7 @@ VectorStoreSearchResult, ) -cognitive_services_endpoint = os.environ.get( - "GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT", "" -) +cognitive_services_endpoint = os.environ["GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT"] token_provider = get_bearer_token_provider( DefaultAzureCredential(), cognitive_services_endpoint ) diff --git a/backend/src/meta_agent/global_search/retrieve.py b/backend/src/meta_agent/global_search/retrieve.py index 024d483..a01f6a6 100644 --- a/backend/src/meta_agent/global_search/retrieve.py +++ b/backend/src/meta_agent/global_search/retrieve.py @@ -18,9 +18,7 @@ GlobalSearchLLMCallback, ) -cognitive_services_endpoint = os.environ.get( - "GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT", "" -) +cognitive_services_endpoint = os.environ["GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT"] token_provider = get_bearer_token_provider( DefaultAzureCredential(), cognitive_services_endpoint ) diff --git a/docs/DEPLOYMENT-GUIDE.md b/docs/DEPLOYMENT-GUIDE.md index 505ff8e..31e7944 100644 --- a/docs/DEPLOYMENT-GUIDE.md +++ b/docs/DEPLOYMENT-GUIDE.md @@ -78,9 +78,9 @@ In the `deploy.parameters.json` file, provide values for the following required `GRAPHRAG_EMBEDDING_DEPLOYMENT_NAME` | | Yes | Deployment name of the Azure OpenAI embedding model. `APIM_NAME` | | No | Hostname of the API. Must be a globally unique name. The API will be accessible at `https://.azure-api.net`. If not provided a unique name will be generated. `RESOURCE_BASE_NAME` | | No | Suffix to apply to all azure resource names. If not provided a unique suffix will be generated. -`AISEARCH_ENDPOINT_SUFFIX` | | No | Suffix to apply to AI search endpoint. Will default to `search.windows.net` for Azure commercial cloud but should be defined for deployments in other Azure clouds. -`REPORTERS` | | No | The type of logging to enable. If not provided, logging will be saved to a file in Azure Storage and to the console in AKS -`GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT` | | No | Endpoint for cognitive services identity authorization. Will default to `https://cognitiveservices.azure.com/.default` for azure commercial cloud but should be defined for deployments in other Azure clouds. +`AISEARCH_ENDPOINT_SUFFIX` | | No | Suffix to apply to AI search endpoint. Will default to `search.windows.net` for Azure Commercial cloud but should be overriden for deployments in other Azure clouds. +`REPORTERS` | | No | The type of logging to enable. If not provided, logging will be saved to a file in Azure Storage and to the console in AKS. +`GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT` | | No | Endpoint for cognitive services identity authorization. Will default to `https://cognitiveservices.azure.com/.default` for Azure Commercial cloud but should be defined for deployments in other Azure clouds. ## 5. Deploy the solution accelerator ``` diff --git a/infra/deploy.sh b/infra/deploy.sh index afa81b2..94fc3d9 100755 --- a/infra/deploy.sh +++ b/infra/deploy.sh @@ -153,6 +153,10 @@ populateOptionalParams () { REPORTERS="blob,console" printf "\tsetting REPORTERS=blob,console\n" fi + if [ -z "$GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT" ]; then + GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT="https://cognitiveservices.azure.com/.default" + printf "\tsetting GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT=$GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT\n" + fi printf "Done.\n" }