Class QueryHistoryEntry

java.lang.Object
io.agentscope.core.rag.integration.bailian.QueryHistoryEntry

public class QueryHistoryEntry extends Object
Query history entry for multi-turn conversation rewrite.

This class represents a single message in the conversation history, used for multi-turn dialogue rewriting to improve retrieval effectiveness.

  • Constructor Details

    • QueryHistoryEntry

      public QueryHistoryEntry(String role, String content)
      Creates a new QueryHistoryEntry.
      Parameters:
      role - the role (user or assistant)
      content - the message content
  • Method Details

    • getRole

      public String getRole()
      Gets the role of this message.
      Returns:
      the role (user or assistant)
    • getContent

      public String getContent()
      Gets the content of this message.
      Returns:
      the message content
    • user

      public static QueryHistoryEntry user(String content)
      Creates a user message entry.
      Parameters:
      content - the user's message
      Returns:
      a new QueryHistoryEntry with role "user"
    • assistant

      public static QueryHistoryEntry assistant(String content)
      Creates an assistant message entry.
      Parameters:
      content - the assistant's response
      Returns:
      a new QueryHistoryEntry with role "assistant"