hibobmaster / matrix_chatgpt_bot

A simple matrix bot that supports image generation and chatting using ChatGPT, Langchain
https://matrix.to/#/#public:matrix.qqs.tw
MIT License
75 stars 13 forks source link

Supporting chatgpt 4.0? #30

Closed jaodei closed 11 months ago

jaodei commented 1 year ago

Does it support chatgpt 4.0 where user can upload a photo/file/etc. and/or get a reply which consists a photo/file/etc.?

I see there is RoomMessageFile event defined in room_events.py in nio package, but I don't know how to get the file from the user and send to openai.

hibobmaster commented 1 year ago

Here is a example about how to handle file: https://github.com/hibobmaster/matrix-stt-bot/blob/main/bot.py#L178

hibobmaster commented 10 months ago

According to openai api reference: https://platform.openai.com/docs/api-reference/chat/create I guess It has not supported yet.