Skip to content

Commit

Permalink
close acheong08#57
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio committed Jun 26, 2023
1 parent b274ec4 commit fca1fe6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions src/Bard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 = {
Expand All @@ -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)
Expand Down Expand Up @@ -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],
Expand Down

0 comments on commit fca1fe6

Please sign in to comment.