MessagePromptTemplate을 사용하여 템플릿을 활용할 수 있습니다. 하나 이상의 MessagePromptTemplates로부터 ChatPromptTemplate을 구성할 수 있습니다. ChatPromptTemplate의 format_prompt를 사용할 수 있으며, 이는 PromptValue를 반환합니다. 이를 문자열 또는 Message 객체로 변환할 수 있으며, 포맷된 값을 llm 또는 chat model의 입력으로 사용할지 여부에 따라 달라집니다.
편의를 위해 template에 from_template 메서드가 제공됩니다. 이 template을 사용한다면 다음과 같이 보일 것입니다:
Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.