Skip to content

Commit b8d885a

Browse files
dorbakerjgbradley1
andauthored
Add cognitive services endpoint to config parameters (#6)
Co-authored-by: Josh Bradley <[email protected]>
1 parent d51813e commit b8d885a

File tree

9 files changed

+200
-183
lines changed

9 files changed

+200
-183
lines changed
Binary file not shown.

backend/graphrag-wheel/note.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ This graphrag wheel file was built from the following repo
22

33
https://github.com/microsoft/graphrag
44

5-
on commit hash 6afec2ae421eabf468e1da8595e1e23d4bda5ecb
5+
on commit hash a389514b4723189803097dc0d602b50d139ee92c
66

backend/src/api/pipeline_settings.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# this yaml file serves as a configuration template for the graphrag indexing jobs
55
# some values are hardcoded while others will be dynamically set
66
input:
7-
type: text
7+
type: blob
8+
file_type: text
89
file_pattern: .*\.txt$
9-
storage_type: blob
1010
storage_account_blob_url: $STORAGE_ACCOUNT_BLOB_URL
1111
container_name: PLACEHOLDER
1212
base_dir: .
@@ -35,6 +35,7 @@ llm:
3535
api_version: $GRAPHRAG_API_VERSION
3636
model: $GRAPHRAG_LLM_MODEL
3737
deployment_name: $GRAPHRAG_LLM_DEPLOYMENT_NAME
38+
cognitive_services_endpoint: $GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT
3839
model_supports_json: True
3940
tokens_per_minute: 80000
4041
requests_per_minute: 480
@@ -56,6 +57,7 @@ embeddings:
5657
batch_size: 16
5758
model: $GRAPHRAG_EMBEDDING_MODEL
5859
deployment_name: $GRAPHRAG_EMBEDDING_DEPLOYMENT_NAME
60+
cognitive_services_endpoint: $GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT
5961
tokens_per_minute: 350000
6062
concurrent_requests: 25
6163
requests_per_minute: 2100

backend/src/meta_agent/community/retrieve.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
)
4545

4646
cognitive_services_endpoint = os.environ.get(
47-
"COGNITIVE_SERVICES_ENDPOINT", "https://cognitiveservices.azure.com/.default"
47+
"GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT",
48+
"https://cognitiveservices.azure.com/.default",
4849
)
4950
token_provider = get_bearer_token_provider(
5051
DefaultAzureCredential(), cognitive_services_endpoint

backend/src/meta_agent/global_search/retrieve.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
)
2020

2121
cognitive_services_endpoint = os.environ.get(
22-
"COGNITIVE_SERVICES_ENDPOINT", "https://cognitiveservices.azure.com/.default"
22+
"GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT",
23+
"https://cognitiveservices.azure.com/.default",
2324
)
2425
token_provider = get_bearer_token_provider(
2526
DefaultAzureCredential(), cognitive_services_endpoint

docs/DEPLOYMENT-GUIDE.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ In the `deploy.parameters.json` file, provide values for the following required
7878
`GRAPHRAG_EMBEDDING_DEPLOYMENT_NAME` | | Yes | Deployment name of the Azure OpenAI embedding model.
7979
`APIM_NAME` | | No | Hostname of the API. Must be a globally unique name. The API will be accessible at `https://<APIM_NAME>.azure-api.net`. If not provided a unique name will be generated.
8080
`RESOURCE_BASE_NAME` | | No | Suffix to apply to all azure resource names. If not provided a unique suffix will be generated.
81-
`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.
82-
`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
81+
`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.
82+
`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.
83+
`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.
8384

8485
## 5. Deploy the solution accelerator
8586
```

infra/deploy.sh

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ AISEARCH_ENDPOINT_SUFFIX=""
1111
APIM_NAME=""
1212
RESOURCE_BASE_NAME=""
1313
REPORTERS=""
14+
GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT=""
1415

1516
requiredParams=(
1617
CONTAINER_REGISTRY_SERVER
@@ -152,6 +153,10 @@ populateOptionalParams () {
152153
REPORTERS="blob,console"
153154
printf "\tsetting REPORTERS=blob,console\n"
154155
fi
156+
if [ -z "$GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT" ]; then
157+
GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT="https://cognitiveservices.azure.com/.default"
158+
printf "\tsetting GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT=$GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT\n"
159+
fi
155160
printf "Done.\n"
156161
}
157162

@@ -353,6 +358,7 @@ deployHelmChart () {
353358
--set "graphragConfig.COSMOS_URI_ENDPOINT=$cosmosEndpoint" \
354359
--set "graphragConfig.GRAPHRAG_API_BASE=$GRAPHRAG_API_BASE" \
355360
--set "graphragConfig.GRAPHRAG_API_VERSION=$GRAPHRAG_API_VERSION" \
361+
--set "graphragConfig.GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT=$GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT" \
356362
--set "graphragConfig.GRAPHRAG_LLM_MODEL=$GRAPHRAG_LLM_MODEL" \
357363
--set "graphragConfig.GRAPHRAG_LLM_DEPLOYMENT_NAME=$GRAPHRAG_LLM_DEPLOYMENT_NAME" \
358364
--set "graphragConfig.GRAPHRAG_EMBEDDING_MODEL=$GRAPHRAG_EMBEDDING_MODEL" \

infra/helm/graphrag/values.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ graphragConfig:
3131
COSMOS_URI_ENDPOINT: ""
3232
GRAPHRAG_API_BASE: ""
3333
GRAPHRAG_API_VERSION: ""
34+
GRAPHRAG_COGNITIVE_SERVICES_ENDPOINT: "https://cognitiveservices.azure.com/.default"
3435
GRAPHRAG_LLM_MODEL: ""
3536
GRAPHRAG_LLM_DEPLOYMENT_NAME: ""
3637
GRAPHRAG_EMBEDDING_MODEL: ""

0 commit comments

Comments
 (0)