View a markdown version of this page

列出在线评估 - Amazon Bedrock AgentCore

列出在线评估

ListOnlineEvaluationConfigsAPI 会检索您的账户和地区中所有在线评估配置的分页列表。此同步操作使用 POST 方法并返回每个配置的摘要信息。

响应包括一系列评估配置摘要,其中包含配置 ARN、ID、名称、描述、生命周期状态(、ACTIVE、、、CREATINGCREATE_FAILEDUPDATINGUPDATE_FAILED、或ERRORDELETING、执行状态(ENABLEDDISABLED)、创建和更新时间戳以及任何失败原因。

AgentCore SDK 的代码示例和 AWS SDK

以下代码示例演示了如何使用不同的开发方法列出在线评估配置。选择最适合您的开发环境和偏好的方法。

AgentCore SDK
  1. from bedrock_agentcore_starter_toolkit import Evaluation # Initialize the evaluation client eval_client = Evaluation() # List all online evaluation configurations, optionally filtered by agent. configs= eval_client.list_online_configs() agent_config_list = configs.get('onlineEvaluationConfigs', []) print(f"Found {len(agent_config_list)} configuration(s) for this agent") for cfg in agent_config_list: print(f" • {cfg['onlineEvaluationConfigName']}") print(f" ID: {cfg['onlineEvaluationConfigId']}") print(f" Status: {cfg['status']}")
AWS SDK
  1. import boto3 client = boto3.client('bedrock-agentcore-control') list_configs_response = client.list_online_evaluation_configs(maxResults=20)
AWS CLI
  1. aws bedrock-agentcore-control list-online-evaluation-configs \ --max-results 20

控制台

您可以通过可视界面查看和管理在线评估配置,该界面以有组织的表格格式显示配置详细信息。

列出在线评估配置

  1. 打开 Amazon Bedrock AgentCore 控制台。

  2. 在导航窗格中,选择 “评估”。

  3. 评估配置卡中,查看列出您创建的评估配置的表。