import langchain
from langchain.chains import LLMChain, SimpleSequentialChain, ConversationChain
from langchain.chat_models import ChatOpenAI
from langchain.memory import ConversationBufferMemory


langchain.verbose = True

chat = ChatOpenAI(model="gpt-3.5-turbo", temperature=0)
conversation = ConversationChain(
    llm=chat,
    memory=ConversationBufferMemory()
)

while True:
    user_message = input("You: ")
    ai_message = conversation.predict(input=user_message)
    print(f"AI: {ai_message}")

langchain.memory.ConversationBufferMemory langchain.chat_models.ChatOpenAI
[((231, 279), 'langchain.chat_models.ChatOpenAI', 'ChatOpenAI', ([], {'model': '"""gpt-3.5-turbo"""', 'temperature': '(0)'}), "(model='gpt-3.5-turbo', temperature=0)\n", (241, 279), False, 'from langchain.chat_models import ChatOpenAI\n'), ((339, 365), 'langchain.memory.ConversationBufferMemory', 'ConversationBufferMemory', ([], {}), '()\n', (363, 365), False, 'from langchain.memory import ConversationBufferMemory\n')]