1、run方法
run方法是基本方法,返回为字符串格式。0.2.0后舍弃
context = "袜子"
chain = LLMChain(prompt=prompt, llm=model)
# 下面三种方式等价
llm_output = chain.run(context)
llm_output = chain.run({
'context': context})
llm_output = chain.run(context=context)
返回
1. 袜趣
2. 足下风情
3. 舒适之旅
4. 袜美人生
5. 步步为赢
chain.run(context)这种形式只用于传入一个参数,若传入多个参数,调用形式如下
chain.run({