Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Commit

Permalink
improvement : Changed images to list so that it maintain order of ima… (
Browse files Browse the repository at this point in the history
  • Loading branch information
Daxitdon authored Jun 9, 2023
1 parent 77419ec commit 6aeace1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Bard.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,12 @@ async def ask(self, message: str) -> dict:
if not chat_data:
return {"content": f"Google Bard encountered an error: {resp.content}."}
json_chat_data = json.loads(chat_data)
images = set()
images = []
if len(json_chat_data) >= 3:
if len(json_chat_data[4][0]) >= 4:
if json_chat_data[4][0][4]:
for img in json_chat_data[4][0][4]:
images.add(img[0][0][0])
images.append(img[0][0][0])
results = {
"content": json_chat_data[0][0],
"conversation_id": json_chat_data[1][0],
Expand Down

0 comments on commit 6aeace1

Please sign in to comment.