The general public in Taiwan generally believes that traditional Chinese medicine (TCM) is mild and has no side effects, but they ignore the safety of traditional Chinese medicine. If the Chinese medicine name and disease name can be correctly identified in the human-machine dialogue, it can help the dialogue system to give correct medication reminders. In this study, a named entity recognition was constructed and applied to the identification of Chinese medicine names and disease names, and the results could be further used in the human-computer dialogue system to provide people with correct Chinese medicine medication reminders. First, this study uses a web crawler to organize network resources to become a TCM named entity corpus, collecting 1097 articles, 1412 disease names and 38714 TCM names. Then we use the Chinese medicine name and BIO labeling method to label each article. Finally, this study trains and evaluates BERT, ALBERT, RoBERTa and GPT2 with biLSTM and CRF. The experimental results show that the NER system of RoBERTa combined with biLSTM and CRF achieves the best system performance, where the Precision is 0.96, the Recall is 0.96 and the F1-score is 0.96.