- [X ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
import json
import creds
import pprint
from azure.cognitiveservices.language.luis.runtime import LUISRuntimeClient
from msrest.authentication import CognitiveServicesCredentials
def predict_from_model(app_id, predictionRequest, is_printing=False):
'''ENDPOINT'''
# print('app_id : ', app_id)
runtimeCredentials = CognitiveServicesCredentials(creds.predictionKey)
clientRuntime = LUISRuntimeClient(endpoint=creds.predictionEndpoint, credentials=runtimeCredentials)
predictionResponse = clientRuntime.prediction.get_slot_prediction(app_id, "Production", predictionRequest)
return predictionResponse
published_app_id = "28a4d09e-a-LUIS-app-id-endpoint"
predictionRequest = {"query":"Hi you can help me by exploring my options to travel from Paris to San Jose."}
predicted = predict_from_model(published_app_id, predictionRequest, is_printing=True)
C\...\luis\trigger_predict_endpoint.py in predict_from_model(app_id, predictionRequest, is_printing)
14 runtimeCredentials = CognitiveServicesCredentials(creds.predictionKey)
15 clientRuntime = LUISRuntimeClient(endpoint=creds.predictionEndpoint, credentials=runtimeCredentials)
---> 16 predictionResponse = clientRuntime.prediction.get_slot_prediction(app_id, "Production", predictionRequest)
17
AttributeError: 'PredictionOperations' object has no attribute 'get_slot_prediction'
This issue is for a:
Minimal steps to reproduce
Any log messages given by the failure
Expected/desired behavior
https://docs.microsoft.com/en-us/python/api/azure-cognitiveservices-language-luis/azure.cognitiveservices.language.luis.runtime.operations.predictionoperations?view=azure-python#get-slot-prediction-app-id--slot-name--prediction-request--verbose-none--show-all-intents-none--log-none--custom-headers-none--raw-false----operation-config-
OS and Version?