diff --git a/setup.py b/setup.py index 8b89166..aa9620a 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name="GoogleBard", - version="1.3.3", + version="1.4.0", license="MIT License", author="Antonio Cheong", author_email="acheong@student.dalat.org", diff --git a/src/Bard.py b/src/Bard.py index 3cef25a..15e3b02 100644 --- a/src/Bard.py +++ b/src/Bard.py @@ -152,7 +152,7 @@ async def save_conversation(self, file_path: str, conversation_name: str) -> Non """ # Load conversations from file conversations = await self.load_conversations(file_path) - + # Update existing one conversation_exists = False for conversation in conversations: @@ -164,7 +164,7 @@ async def save_conversation(self, file_path: str, conversation_name: str) -> Non conversation["choice_id"] = self.choice_id conversation["SNlM0e"] = self.SNlM0e conversation_exists = True - + # Create conversation object if not conversation_exists: conversation = { @@ -176,7 +176,7 @@ async def save_conversation(self, file_path: str, conversation_name: str) -> Non "SNlM0e": self.SNlM0e, } conversations.append(conversation) - + # Save to the file with open(file_path, "w", encoding="utf-8") as f: json.dump(conversations, f, indent=4) @@ -268,7 +268,7 @@ async def ask(self, message: str) -> dict: for img in json_chat_data[4][0][4]: images.append(img[0][0][0]) results = { - "content": json_chat_data[0][0], + "content": json_chat_data[4][0][1][0], "conversation_id": json_chat_data[1][0], "response_id": json_chat_data[1][1], "factualityQueries": json_chat_data[3],