From cff62dac9fb07ac55c3f7b8828357b2a6ee91cc0 Mon Sep 17 00:00:00 2001 From: Antonio Date: Fri, 2 Jun 2023 01:04:25 +0800 Subject: [PATCH] close #43 --- src/Bard.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Bard.py b/src/Bard.py index 964ba07..b388998 100644 --- a/src/Bard.py +++ b/src/Bard.py @@ -17,6 +17,8 @@ from rich.console import Console from rich.markdown import Markdown +from typing import List, Dict + def __create_session() -> PromptSession: return PromptSession(history=InMemoryHistory()) @@ -116,7 +118,7 @@ def save_conversation(self, file_path: str, conversation_name: str): with open(file_path, "w", encoding="utf-8") as f: json.dump(conversations, f, indent=4) - def load_conversations(self, file_path: str) -> list[dict]: + def load_conversations(self, file_path: str) -> List[Dict]: # Check if file exists if not os.path.isfile(file_path): return []