class_docstr: Agent class to improve the conversational experience in PandasAI
class_docstr_tok: ["Agent","class","to","improve","the","conversational","experience","in","PandasAI"]
docstr: Args:
      df (Union[DataFrameType, List[DataFrameType]]): DataFrame can be Pandas,
      Polars or Database connectors
      memory_size (int, optional): Conversation history to use during chat.
      Defaults to 1.
docstr_tok: ["Args",":","df","(","Union","[","DataFrameType",",","List","[","DataFrameType","]","]",")",":","DataFrame","can","be","Pandas",",","Polars","or","Database","connectors","memory_size","(","int",",","optional",")",":","Conversation","history","to","use","during","chat",".","Defaults","to","1","."]
code: def __init__(
      self,
      dfs: Union[DataFrameType, List[DataFrameType]],
      config: Optional[Union[Config, dict]] = None,
      logger: Optional[Logger] = None,
      memory_size: int = 10,
  ):
      """
      Args:
          df (Union[DataFrameType, List[DataFrameType]]): DataFrame can be Pandas,
          Polars or Database connectors
          memory_size (int, optional): Conversation history to use during chat.
          Defaults to 1.
      """
  
      if not isinstance(dfs, list):
          dfs = [dfs]
  
      self._lake = SmartDatalake(
          dfs, config, logger, memory=Memory(memory_size)
      )
  
      # set instance type in SmartDataLake
      self._lake.set_instance_type(self.__class__.__name__)
  
      self._logger = self._lake.logger
  
imports: import json
  from typing import Union, List, Optional
  from ..helpers.df_info import DataFrameType
  from ..helpers.logger import Logger
  from ..helpers.memory import Memory
  from ..prompts.base import AbstractPrompt
  from ..prompts.clarification_questions_prompt import ClarificationQuestionPrompt
  from ..prompts.explain_prompt import ExplainPrompt
  from ..prompts.rephase_query_prompt import RephraseQueryPrompt
  from ..prompts.check_if_relevant_to_conversation import CheckIfRelevantToConversationPrompt
  from ..schemas.df_config import Config
  from ..skills import Skill
  from ..smart_datalake import SmartDatalake
label_desc: Use image node_id 1 to create a new Agent object  with example: obj = Agent(dfs, config, logger, memory_size)