GAP: Graph-Assisted Prompts for Dialogue-based Medication Recommendation