Skip to content

Commit 6f0e0f0

Browse files
authored
Updated key/endpoint
Endpoints are not region-based anymore, but rather custom domain -based. Although regional endpoints will still work. Also, the authentication information is moving to a standard of getting it from environment variables.
1 parent 0d20f1e commit 6f0e0f0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/Language/BingSpellCheckv7.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77

88
params = {'mkt': 'en-US', 'mode': 'proof', 'text': text}
99

10-
# NOTE: Replace this example key with a valid subscription key.
11-
key = 'enter key here'
10+
# Add your Bing Spell Check subscription key to your environment variables.
11+
key = os.environ['BING_SPELL_CHECK_SUBSCRIPTION_KEY']
1212

13-
host = 'api.cognitive.microsoft.com'
13+
# Add your Bing Spell Check endpoint to your environment variables.
14+
host = os.environ['BING_SPELL_CHECK_ENDPOINT']
1415
path = '/bing/v7.0/spellcheck'
1516

1617
headers = {'Ocp-Apim-Subscription-Key': key,

0 commit comments

Comments
 (0)