■ PromptTemplate 클래스를 사용해 이모지가 포함된 시각적 요약문 프롬프트를 만드는 방법을 보여준다.
▶ 예제 코드 (PY)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
from langchain.prompts import PromptTemplate promptTemplateString = """Please summarize the sentence according to the following REQUEST. REQUEST : 1. Summarize the main points in bullet points. 2. Each summarized sentence must start with an emoji that fits the meaning of the each sentence. 3. Use various emojis to make the summary more interesting. 4. DO NOT include any unnecessary information. CONTEXT : {context} SUMMARY : """ promptTemplate = PromptTemplate.from_template(promptTemplateString) |
※ pip install langchain 명령을 실행했다.