xqdoo00o / ChatGPT-to-API

Scalable unofficial ChatGPT API for production.
650 stars 129 forks source link

大佬有考虑添加多媒体功能吗? #11

Closed AnanasJin closed 11 months ago

AnanasJin commented 11 months ago

data: {"message": {"id": "021e423c-1abc-4473-bd81-2aa75e745f70", "author": {"role": "tool", "name": "dalle.text2im", "metadata": {}}, "create_time": null, "update_time": null, "content": {"content_type": "multimodal_text", "parts": [

{"content_type": "image_asset_pointer", "asset_pointer": "file-service://file-wXiaaOn5Glt0XvRdzglDxXe0", "size_bytes": 142344, "width": 1024, "height": 1024, "fovea": null, "metadata": {"dalle": {"prompt": "Photo of a fluffy white cat with blue eyes sitting gracefully on a windowsill, with sunrays illuminating its fur.", "seed": 5000, "serialization_title": "DALL-E generation metadata"}}},

{"content_type": "image_asset_pointer", "asset_pointer": "file-service://file-L6IAt6o1InshqAn3aNEDkWPZ", "size_bytes": 346572, "width": 1024, "height": 1024, "fovea": null, "metadata": {"dalle": {"prompt": "Illustration of a sleek black cat with green eyes perched atop a fence against a starry night sky.", "seed": 5000, "serialization_title": "DALL-E generation metadata"}}},

{"content_type": "image_asset_pointer", "asset_pointer": "file-service://file-z15jm2RKoAO2KBQayrhM3cuN", "size_bytes": 339150, "width": 1024, "height": 1024, "fovea": null, "metadata": {"dalle": {"prompt": "Watercolor painting of a ginger tabby cat playfully chasing a butterfly in a flower-filled garden.", "seed": 5000, "serialization_title": "DALL-E generation metadata"}}},

{"content_type": "image_asset_pointer", "asset_pointer": "file-service://file-JvNFCc1QP7ClgEm6kCrV9vnG", "size_bytes": 134044, "width": 1024, "height": 1024, "fovea": null, "metadata": {"dalle": {"prompt": "Photo of a Siamese cat lounging lazily on a plush red cushion, with its tail curled around its body.", "seed": 5000, "serialization_title": "DALL-E generation metadata"}}}]}, "status": "finished_successfully", "end_turn": null, "weight": 1.0, "metadata": {"message_type": "next", "model_slug": "gpt-4-dalle", "parent_id": "e1db25d4-e787-49e2-b172-82626f24ddea"}, "recipient": "all"}, "conversation_id": "524c825a-fb6e-49b9-91e7-8e9cd63cef82", "error": null}

这种多媒体流好像直接忽略了,能不能考虑获取里面的asset_pointer,然后通过backend-api/files得到他的下载连接(下载连接好像有时效),最后(用markdown格式)返回给客户端。

xqdoo00o commented 11 months ago

等我账号有dalle权限再说吧

xqdoo00o commented 11 months ago

这样是不是没啥价值,因为链接过期了,就看不了图片了

AnanasJin commented 11 months ago

这样是不是没啥价值,因为链接过期了,就看不了图片了

可以存下来?

xqdoo00o commented 11 months ago

可以了,不过链接就一个小时有效期,可以单击把图片下载下来。

AnanasJin commented 11 months ago

谢谢大佬!