From 2da890adf7f05d7958203aaa5260086f4be83765 Mon Sep 17 00:00:00 2001 From: ArslanSaleem Date: Fri, 22 Sep 2023 20:03:42 +0500 Subject: [PATCH] fix: refactor types --- examples/agent.py | 2 +- pandasai/agent/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/agent.py b/examples/agent.py index ae5727fc8..158537a19 100644 --- a/examples/agent.py +++ b/examples/agent.py @@ -18,7 +18,7 @@ salaries_df = pd.DataFrame(salaries_data) -llm = OpenAI("sk-lyDyNVyBwnykr1lJ4Yc7T3BlbkFJtJNyJlKTAvUa2E2D5Wdb44") +llm = OpenAI("OPEN_API_KEY") agent = Agent([employees_df, salaries_df], config={"llm": llm}, memory_size=10) # Chat with the agent diff --git a/pandasai/agent/__init__.py b/pandasai/agent/__init__.py index 6ae93b42d..ef2c798dc 100644 --- a/pandasai/agent/__init__.py +++ b/pandasai/agent/__init__.py @@ -19,13 +19,13 @@ class Agent: _memory: Memory _lake: SmartDatalake = None - logger: Logger = None + logger: Optional[Logger] = None def __init__( self, dfs: Union[DataFrameType, List[DataFrameType]], config: Optional[Union[Config, dict]] = None, - logger: Logger = None, + logger: Optional[Logger] = None, memory_size: int = 1, ): """