2024-05-07 21:40:14 +02:00
|
|
|
import random
|
|
|
|
|
|
|
|
|
2024-05-05 21:42:45 +02:00
|
|
|
class DialogueStrategy:
|
|
|
|
@staticmethod
|
2024-05-07 21:40:14 +02:00
|
|
|
def decide_response(state: dict, responses) -> str:
|
|
|
|
intent_responses = responses.get(state['last_intent'], ["Przepraszam, nie rozumiem. Możesz to powtórzyć?"])
|
|
|
|
return random.choice(intent_responses)
|