Modify based on Existing code seems uneasy, we may switch to the LangChain Template for Production ready code.