added

v0.0.57 Support Passing Attachments between Bots

  1. Bots can now pass attachments to each other via fp.stream_request. To do this, call the post_message_attachment function, which continues to work like before, but will now also implicitly emit a file event to other server bots calling it. Calling bots will receive the file in the attachment field of a PartialResponse from the bot.
  2. OpenAI tool calling improvement: the request will finish without making an extra unnecessary second call to the OpenAI bot if no tools are decided to be called. This saves cost to the user.

Protocol Changes:

  • Add new file event to the protocol:
{
    url: str,
    name: str,
    content_type: str,
    inline_ref: Optional[str] = None,
}
  • This event represents an attachment made by a bot. It is implicitly yielded when you call post_message_attachment, which continues to work like before.

fastapi_poe changes:

  • Added attachment field to PartialResponse object, which can contain file attachments from other bots.