code: import langchain as lc
  import openai as ai
  import datasets as ds
  import tiktoken as tk
  
  import os
  from langchain_openai import ChatOpenAI
  from dotenv import load_dotenv
  import os
  
  # Load environment variables from .env file
  load_dotenv()
  
  # Get the OpenAI API key from the environment variable
  openai_api_key = os.getenv("OPENAI_API_KEY")
  
  if openai_api_key is None:
      raise ValueError("No OpenAI API key found. Please set it in the .env file.")
  
  # Initialize the ChatOpenAI with the API key
  chat = ChatOpenAI(open_api_key=openai_api_key, model="gpt-3.5-turbo")
  
  from langchain.schema import (
      SystemMessage,
      HumanMessage,
      AIMessage
  )
  
  messages = [
      SystemMessage(content="You are a helpful assistant."),
      HumanMessage(content="Hi AI, how are you today?."),
      AIMessage(content="I am great, thank you. How can I help you?"),
      HumanMessage(content="I am looking for a restaurant in the center of Berlin."),
  ]
  
  
apis: langchain.schema.SystemMessage langchain.schema.AIMessage langchain.schema.HumanMessage langchain_openai.ChatOpenAI
extract_api: [((224, 237), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (235, 237), False, 'from dotenv import load_dotenv\n'), ((311, 338), 'os.getenv', 'os.getenv', (['"""OPENAI_API_KEY"""'], {}), "('OPENAI_API_KEY')\n", (320, 338), False, 'import os\n'), ((501, 563), 'langchain_openai.ChatOpenAI', 'ChatOpenAI', ([], {'open_api_key': 'openai_api_key', 'model': '"""gpt-3.5-turbo"""'}), "(open_api_key=openai_api_key, model='gpt-3.5-turbo')\n", (511, 563), False, 'from langchain_openai import ChatOpenAI\n'), ((667, 720), 'langchain.schema.SystemMessage', 'SystemMessage', ([], {'content': '"""You are a helpful assistant."""'}), "(content='You are a helpful assistant.')\n", (680, 720), False, 'from langchain.schema import SystemMessage, HumanMessage, AIMessage\n'), ((726, 776), 'langchain.schema.HumanMessage', 'HumanMessage', ([], {'content': '"""Hi AI, how are you today?."""'}), "(content='Hi AI, how are you today?.')\n", (738, 776), False, 'from langchain.schema import SystemMessage, HumanMessage, AIMessage\n'), ((782, 845), 'langchain.schema.AIMessage', 'AIMessage', ([], {'content': '"""I am great, thank you. How can I help you?"""'}), "(content='I am great, thank you. How can I help you?')\n", (791, 845), False, 'from langchain.schema import SystemMessage, HumanMessage, AIMessage\n'), ((851, 929), 'langchain.schema.HumanMessage', 'HumanMessage', ([], {'content': '"""I am looking for a restaurant in the center of Berlin."""'}), "(content='I am looking for a restaurant in the center of Berlin.')\n", (863, 929), False, 'from langchain.schema import SystemMessage, HumanMessage, AIMessage\n')]