chore: rename multiple files to improve importability and module structure
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
from langchain_core.prompts import ChatPromptTemplate
|
||||
|
||||
# 定义提示词模板(推荐写法)
|
||||
prompt = ChatPromptTemplate.from_messages([
|
||||
("system","你非常可爱,说话末尾会带个喵"),
|
||||
("human","{input}") # {input}:占位符
|
||||
])
|
||||
# 格式化输出
|
||||
formatted_prompt = prompt.invoke({"input":"你好喵"})
|
||||
print(formatted_prompt)
|
||||
Reference in New Issue
Block a user