Chain也可以分叉、合并,组合出更复杂
# 创建输出解析器
output_parser = StrOutputParser()
# 创建Prompt
topic_prompt = ChatPromptTemplate.from_template("生成一种'{input}'的名称")
good_prompt = ChatPromptTemplate.from_template("列举{topic}的好处:")
bad_prompt = laipuhuo.com ChatPromptTemplate.from_template("列举{topic}的坏处:"
output_parser = StrOutputParser()
# 创建Prompt
topic_prompt = ChatPromptTemplate.from_template("生成一种'{input}'的名称")
good_prompt = ChatPromptTemplate.from_template("列举{topic}的好处:")
bad_prompt = laipuhuo.com ChatPromptTemplate.from_template("列举{topic}的坏处:"
全部评论
相关推荐
03-07 15:11
湖南财政经济学院 研发工程师 点赞 评论 收藏
分享
查看8道真题和解析