9 lines
280 B
Python
9 lines
280 B
Python
import random
|
|
|
|
|
|
class DialogueStrategy:
|
|
@staticmethod
|
|
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)
|