Zero6992 / chatGPT-discord-bot

Integrate ChatGPT into your own discord bot
GNU General Public License v2.0
2.6k stars 699 forks source link

Bard Feature #410

Closed Murat1Na closed 3 months ago

Murat1Na commented 1 year ago

Since bard can create images now, can you add this feature

Hikoboshi00 commented 1 year ago

I'm wondering about this too.

Hikoboshi00 commented 1 year ago

I've found a workaround for this issue. Now, the bot will include the image link. Modify the function bard_handle_response in responses.py using the following code:

`async def bard_handle_response(message, client) -> str: response = await sync_to_async(client.chatbot.ask)(message)

responseMessage = response["content"] images = response.get('images', [])

if images: for img in images: responseMessage += f"\n"

return responseMessage`