Hi Team, I have implemented custom actions(on mood bot project) in actions.py file. getting below error. Your versions of rasa and rasa_sdk might not be compatible. You are currently running rasa version 2.0.2 and rasa_sdk version 2.1.2. To ensure compatibility use the same version for both, modulo the last number, i.e. using version A.B.x the numbers A and B should be identical for both rasa and rasa_sdk. below is my code:
class ActionCoronaState(Action):
def name(self) -> Text:
return "action_corona_state"
async def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:
response = requests.get('https://api.covid19india.org/data.json').json()
print('response check point')
#entities =tracker.get_latest_entity_values('text')
entities = tracker.latest_message['entities']
#entities = tracker.latest_messages.get['entities']
print('latest messages now ',entities)
state = ""
for e in entities:
if e['entity'] == state:
state = e['value']
message = 'Please enter correct state name'
print('message',message)
if state == 'india':
state = 'Total'
print(state)
for data in response['statewise']:
if data['state']== state.title():
print(data)
message = 'Active :'+data['active']+'Confirmed :'+data['confirmed']+'Recovered :'+data['recovered']+'State :'+data['state']+'Statecode :'+data['statecode']
dispatcher.utter_message(message)
return []
Can any one please suggest how to sort out this issue. thanks, subbu.