Can you please give me more details about the conversation? Is it running as a conversation (e.g., using Conversation Trigger) or as a series of barks using Bark On Dialogue Event?
If it's a conversation, you can call DialogueManager.StopConversation().
If it's a series of Bark On Dialogue Event, you can set a variable and check that variable in the Condition section.