包级(Package-level) 声明(declarations)

类型

Link copied to clipboard

一个 ADK(Application Development Kit,应用程序开发工具包) 插件(Plugin) 该插件负责将代理执行事件记录到 BigQuery 表中。如果目标表不存在,插件会在首次使用时自动创建并配置该表(该表为分区表)。数据会以批次的形式在后台通过 BigQuery 的存储写入 API(Storage Write API)被写入表中。 关闭 当完成写入操作后,那些仍然处于队列中的数据行仍未被写入数据库。

Link copied to clipboard
data class BigQueryLoggerConfig @JvmOverloads constructor(val projectId: String, val datasetId: String, val enabled: Boolean = true, val location: String = "US", val tableName: String = "agent_events", val credentials: Credentials? = null, val eventAllowlist: Set<String> = emptySet(), val eventDenylist: Set<String> = emptySet(), val maxContentLength: Int = 500 * 1024, val clusteringFields: List<String> = BigQuerySchema.getDefaultClusteringFields(), val logMultiModalContent: Boolean = true, val logSessionMetadata: Boolean = true, val customTags: Map<String, Any?> = emptyMap(), val autoSchemaUpgrade: Boolean = true, val createViews: Boolean = false, val viewPrefix: String = "v", val contentFormatter: (Any, String) -> Any?? = null, val retryConfig: RetryConfig = RetryConfig(), val batchSize: Int = 1, val batchFlushInterval: Duration = Duration.ofSeconds(1), val shutdownTimeout: Duration = Duration.ofSeconds(10), val queueMaxSize: Int, val flushOnRunEnd: Boolean = true)

用于配置 BigQueryAgentAnalyticsPlugin 的相关设置。

Link copied to clipboard

这是一个用于定义 BigQuery 事件表结构的工具(utility)。

Link copied to clipboard
data class RetryConfig @JvmOverloads constructor(val maxRetries: Int = 3, val initialDelay: Duration = Duration.ofSeconds(1), val multiplier: Double = 2.0, val maxDelay: Duration = Duration.ofSeconds(10))

如何 BigQueryAgentAnalyticsPlugin 重新尝试写入那些 BigQuery 未能成功写入的数据行。