CaseGPT: a case reasoning framework based on language models and retrieval-augmented generation