Skip to content

v3.1.5.5

Compare
Choose a tag to compare
@Maplemx Maplemx released this 05 Feb 03:33
· 405 commits to main since this release

New Feature:

  1. [Agent Component: Session] Added chat history manual management methods and settings:

    Methods:

    • .add_chat_history(role: str, cotnent: str)
    • .get_chat_history(*, is_shorten: bool=False)
    • .rewrite_chat_history(new_chat_history: list)

    Settings:

    • strict_orders:
      Setting value is set as True by default.
      If this setting is True, component will ensure chat history append in "User-Assistant-User-Assistant" orders and when the order is incorrect, manual management methods above will automatically help developers combining chat history content.
      You can use .toggle_strict_orders(False) to avoid strict_orders mode.
    • manual_chat_history:
      Setting value is set as False by default.
      You can use .toggle_manual_chat_history(True) to active manual chat history management mode.
      If this setting is True, component will stop automatically fetch and append chat history from agent request's response to allow developers to add chat history manually using methods above. Turn on this setting when .active_session() is on will ensure manual managed chat history be passed to next agent request to enable manual managed multi-round chat.

Update:

  1. [Tool]Improved tool using prompt and improved the adaptation when timelimit argument is not in options dict when using search tool;
  2. [Framework] Updated agent alias info printer, now you can use agent.alias_manager.print_alias_info(group_by="agent_component") to print alias group by component names;
  3. [Framework] Updated JSON find and decode methods, import json5 lib and improved error report detail in debug mode;
  4. [Request: ERNIE] Updated default model name to "ernie-4.0" to follow Baidu official model name updating.

Bug Fix:

  1. [Framework] Fixed event loop closed error when using tools or fixing json decode error;
  2. [Agent Component: Segment] Fixed a bug that will cause segment main thread close too early before all async handlers finish their works;
  3. [Agent Component: Segment] Fixed a bug that will cause segment can not overwrite prompt_output.