Spaces:
Runtime error
Runtime error
File size: 447 Bytes
037db72 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from langchain import OpenAI, ConversationChain
llm = OpenAI(temperature=0)
conversation = ConversationChain(llm=llm, verbose=True)
conversation.predict(input="作为一名国内资深理财师,可以给我一些投资理财建议吗?")
conversation.predict(input="继续")
while True:
msg=input("Human:")
if msg == 'Bye':
break
conversation.predict(input=msg)
conversation.predict(input="好的")
print("Finished!") |