AS AgentScopeAPI 手册 / API Reference

Pair

public record Pair<T, U>(T first, U second)
源码Source io/agentscope/core/memory/autocontext/Pair.java:33

承载 Pair数据的记录类型。位于 io.agentscope.core.memory.autocontext 包。核心成员包括 first、second。

Generic pair record to hold two values of potentially different types.

This record is used throughout AutoContextMemory to represent pairs of related values, such as start and end indices for message ranges, or other paired data structures.

Common usage examples:

  • Message index ranges: Pair<Integer, Integer> for (startIndex, endIndex)

  • User-assistant pairs: Pair<Integer, Integer> for (userIndex, assistantIndex)

记录组件摘要Record Component Summary

组件Component类型Type说明Description
firstT
执行第一个相关操作。
Performs the first operation.
secondU
执行 `second` 方法。
Performs the second operation.

记录组件详情Record Component Detail

first

T first

执行第一个相关操作。

Performs the first operation.

源码Source io/agentscope/core/memory/autocontext/Pair.java:33

second

U second

执行 second 方法。

Performs the second operation.

源码Source io/agentscope/core/memory/autocontext/Pair.java:33
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.