현재 왓슨 밥봇 대화 응용 프로그램으로 작업 중입니다. 나는 사용자 입력에 따라 특정 단계에서 컨텍스트를 새로 고쳐야하는 상황에 처했지만 상황을 이룰 수 없었다.왓슨 대화 컨텍스트
I tried setting the context = {}, if the user input isn't in the Array, but it seems to check the context at every stage of the Application.
if(context.city !== array[i]['city']){
context = {};
}
what i am asking the user is to input a list of cities, which is in an Array. If the user inputs a location that isn't in the Array first, it let's the user know that it isn't in the Array. If the user inputs a city that is not in the Array after inputing a city that is already in the array, it is returning the last context.
for example,
City = Boston.
You just input Boston, price is 20.
Then if i do City = Atlanta(Bearing in mind Atlanta is not in the Array)
it does city is Atlanta, price is 20.
Any idea how to fix this, on any steps i can follow to stop this from happening?
고마워요, 실제로 이것을 게시 한 후 약 10 분 동안 할 방법을 알아 냈습니다. 고맙습니다. –