챗봇만들기1 [LangChain] 공식문서 Build a Chatbot 실습 (3) Prompt templates Prompt templates는 사용자의 raw information을 LLM이 작업할 수 있는 형식으로 변화하는 데에 도움을 줍니다. 오늘 실습에서는 먼저 사용자의 instructions이 포함된 system message를 추가해보겠습니다. 그 다음으로는 messages 이외에 다양한 input을 추가해보겠습니다. 다음과 같은 코드를 통해 input type을 변경할 수 있습니다. 단순한 메시지 대신, 메시지를 포함하고 있는 'messages key'를 딕셔너리 형태로 전달하게 됩니다. from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholderprompt = ChatPromptTemplate.f.. 2024. 8. 26. 이전 1 다음