Usage

Simple Example

In this example we will have a user that is terminal-based and an agent that only parrots back what the user said.

  1. Imports

    from dialoguekit.participant.user import User
    from sample_agents.parrot_agent import ParrotAgent
    from dialoguekit.platforms.platform import Platform
    from dialoguekit.connector.dialogue_connector import DialogueConnector
    
  2. Define agent and user

    # Participants
    agent = ParrotAgent("A01")
    user = User("U01")
    
  3. Create and connect platform and dialogue connector

    platform = Platform()
    dc = DialogueConnector(agent, user, platform)
    
    user.connect_dialogue_connector(dc)
    agent.connect_dialogue_connector(dc)
    
  4. Start conversation

    dc.start()
    dc.close()