Skip to content

0.0.43 add should_insert_attachment_messages

Compare
Choose a tag to compare
@JohntheLi JohntheLi released this 08 May 00:50
· 25 commits to main since this release
435fd3b

Release Notes:

  • (deprecated) concat_attachments_to_message: this function added file content from user attachments directly into the text of the last user message. This method of adding attachments is suboptimal for LLMs and is being deprecated. Use the newly added should_insert_attachment_messages instead. This function will be removed in a future release.
  • (added) should_insert_attachment_messages: this function adds file contents from user attachments into their own individual messages and inserts them right before the last user message. This provides better LLM performance than concat_attachments_to_message. Note that this breaks the user-bot message alternation. If the LLM you are using requires that, try using make_prompt_author_role_alternated.
  • (added) make_prompt_author_role_alternated: this function takes in a conversation, and concats consecutive messages from the same role. This is useful for LLM providers that require role alternation.

Breaking Changes:

This release makes should_insert_attachment_messages=True by default, and disables the deprecated concat_attachments_to_message by default.