MessagePromptTemplate을 사용하여 템플릿을 활용할 수 있습니다. 하나 이상의 MessagePromptTemplates에서 ChatPromptTemplate을 빌드할 수 있습니다. ChatPromptTemplate의 format_prompt를 사용할 수 있습니다 — 이것은 PromptValue를 반환하며, 형식화된 값을 llm 또는 채팅 모델에 입력으로 사용하려는지 여부에 따라 문자열 또는 Message 객체로 변환할 수 있습니다.
편의를 위해 템플릿에 from_template 메서드가 노출되어 있습니다. 이 템플릿을 사용한다면 다음과 같이 보일 것입니다:
Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.