View a markdown version of this page

列出在线评估 - Amazon Bedrock AgentCore
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)。

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

列出在线评估

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

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

AgentCore SDK 和 SDK 的代码示例 Amazon 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']}")
Amazon SDK
  1. import boto3 client = boto3.client('bedrock-agentcore-control') list_configs_response = client.list_online_evaluation_configs(maxResults=20)
Amazon CLI
  1. aws bedrock-agentcore-control list-online-evaluation-configs \ --max-results 20

控制台

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

列出在线评估配置

  1. 打开亚马逊 Bedrock AgentCore 控制台。

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

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