poe-platform / fastapi_poe

A helper library for writing Poe API bots using FastAPI
Apache License 2.0
135 stars 25 forks source link

How to Allow URLs and Attachments to my Bot #6

Closed abdfnx closed 1 year ago

abdfnx commented 1 year ago

Hi @JelleZijlstra, How I can use the message attachments like URLs or files to my code ?

JelleZijlstra commented 1 year ago

For sending files to the bot, I added an extension to the protocol recently: https://github.com/poe-platform/documentation/commit/d67fb15919a527aed99f057dc13613eec683da49. However, it is not implemented on our side yet, I'm hoping to do that soon.

abdfnx commented 1 year ago

For sending files to the bot, I added an extension to the protocol recently: poe-platform/documentation@d67fb15. However, it is not implemented on our side yet, I'm hoping to do that soon.

and what about URLs ?

JelleZijlstra commented 1 year ago

Users can just type in URLs in the markdown input, no special support needed.

abdfnx commented 1 year ago

Web capture_6-8-2023_172825_poe com

Look

JelleZijlstra commented 1 year ago

That's something you should be able to do in your own bot. In your code, you can recognize that there is a URL and fetch the data from the Internet.

abdfnx commented 1 year ago

Can you give me an example code ?

abdfnx commented 1 year ago

Web capture_6-8-2023_17388_poe com

I want it to be like this

abdfnx commented 1 year ago

OK @JelleZijlstra

JelleZijlstra commented 1 year ago

Sorry I can't give example code right now. We may add support for URL fetching to API bots on our side in the future.

qingyanbaby commented 1 month ago

Sorry I can't give example code right now. We may add support for URL fetching to API bots on our side in the future.

Is it supported now? @JelleZijlstra