接口 TaskStore

所有已知实现类:
InMemoryTaskStore

public interface TaskStore
Simplified interface for task storage providers. Stores and retrieves both the task and its full message history together.
  • 方法概要

    修饰符和类型
    方法
    说明
    load(String taskId)
    Loads a task and its history by task ID.
    void
    save(Task task)
    Saves a task and its associated message history.
  • 方法详细资料

    • save

      void save(Task task)
      Saves a task and its associated message history. Overwrites existing data if the task ID exists.
      参数:
      task - The task context object to save.
    • load

      Task load(String taskId)
      Loads a task and its history by task ID.
      参数:
      taskId - The ID of the task to load.
      返回:
      an object containing the Task and its history, or null if not found.