Skip to content

Commit 2aa6e90

Browse files
authored
Updated constructor/class name
1 parent df781f0 commit 2aa6e90

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

samples/search/entity_search_samples.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
from azure.cognitiveservices.search.entitysearch import EntitySearchAPI
1+
from azure.cognitiveservices.search.entitysearch import EntitySearchClient
22
from azure.cognitiveservices.search.entitysearch.models import Place, ErrorResponseException
33
from msrest.authentication import CognitiveServicesCredentials
44

55
# Add your Bing Entity Search subscription key to your environment variables.
66
SUBSCRIPTION_KEY = os.environ['BING_ENTITY_SEARCH_SUBSCRIPTION_KEY']
7-
7+
ENDPOINT = os.environ['BING_ENTITY_SEARCH_ENDPOINT']
88

99
def dominant_entity_lookup(subscription_key):
1010
"""DominantEntityLookup.
1111
1212
This will look up a single entity (Satya Nadella) and print out a short description about them.
1313
"""
14-
client = EntitySearchAPI(
15-
endpoint="https://api.cognitive.microsoft.com",
14+
client = EntitySearchClient(
15+
endpoint=ENDPOINT,
1616
credentials=CognitiveServicesCredentials(subscription_key)
1717
)
1818

0 commit comments

Comments
 (0)