ITPub博客

首页 > 人工智能 > 人工智能 > Claude Opus 5.5 现已在 AWS 上推出

Claude Opus 5.5 现已在 AWS 上推出

人工智能 作者:ITPUB社群 时间:1970-01-01 08:33:46 0 删除 编辑

今天,我们很高兴地宣布 Claude Opus 5.5 在 Amazon Bedrock 和 AWS 上的 Claude Platform 上推出,这是 Claude 5.5 模型家族的首个模型。Claude Opus 5.5 是 Anthropic 功能最强大的 Opus 模型,适用于智能体编码、知识工作和长时间运行的任务。

本文将介绍 Claude Opus 5.5 的改进、实用指南,以及如何在 Amazon Bedrock 上开始使用该模型进行构建。

Claude Opus 5.5 有何不同

据 Anthropic 称,Claude Opus 5.5 相比 Claude Opus 5 能用更少的 token 完成更多工作,新的定价将这些收益直接传递给客户。更低的每 token 价格和大幅降低的缓存读取成本叠加在效率提升之上。结果是每项任务的平均成本低于 Claude Opus 5,因此团队可以大规模运行更具雄心的智能体工作。

Claude Opus 5.5 经过训练,能够更清晰地沟通。在工作过程中,它会呈现它做了什么、发现了什么以及需要什么,使长时间运行的任务更易于跟进。自适应思考始终开启,Opus 5.5 会决定每项任务需要多少推理。你可以使用 effort 作为控制手段,而不是手动设置思考预算。

Claude Opus 5.5 是首个配备安全分类器的 Opus 模型,类似于 Claude Fable 5.1 在生物学、网络安全和 AI 开发方面的分类器。与之前的 Opus 版本相比,请求将更频繁地被拒绝。

使用场景

Claude Opus 5.5 的能力非常适合一致性和深度最为重要的行业。在软件开发中,Opus 5.5 相比 Opus 5 在长时间运行的会话中有所改进,具有清晰的沟通和可解释性,使其更易于使用、审查和信任。在知识工作方面,与 Opus 5 相比,它在处理和创建长文档及报告时需要更少的纠正。

在 Amazon Bedrock 上开始使用 Claude Opus 5.5

要试用 Claude Opus 5.5,请打开 Amazon Bedrock 控制台,选择 Test,然后选择 Playground,并选择 Claude Opus 5.5 作为模型。在那里,你可以直接对其运行提示词。

图 1:在 Amazon Bedrock 控制台 Playground 中选择 Anthropic Claude 模型

图 2:在 Amazon Bedrock 控制台 Playground 中针对 Claude 模型运行提示词

在编程方式上,你可以通过 Anthropic Messages API(应用程序编程接口) 针对 bedrock-runtime 和 bedrock-mantle 调用该模型(通过 Anthropic SDK(软件开发工具包))。你也可以通过 AWS Command Line Interface (AWS CLI) 和 AWS SDK 继续使用 bedrock-runtime 上的 Invoke 和 Converse API。

先决条件

  • 拥有可访问 Amazon Bedrock 的有效 AWS 账户。

  • 已安装并配置 AWS Command Line Interface (AWS CLI)。

  • Python 3.10+。

  • 已安装 Boto3:pip install boto3 。

  • 已安装 Anthropic SDK:pip install anthropic 。

  • 已安装用于 Amazon Bedrock 身份验证的 Amazon Bedrock Token Generator:pip install aws_bedrock_token_generator 。

  • AWS Identity and Access Management (IAM) 权限:bedrock:InvokeModel 和 bedrock:InvokeModelWithResponseStream 。

一个使用 AWS SDK for Python (Boto3) 的快速示例:

import boto3
import json

# Create a Bedrock Runtime client
bedrock_runtime = boto3.client(
    service_name="bedrock-runtime",
    region_name="us-east-1"
)

# Invoke Claude Opus 5.5
response = bedrock_runtime.invoke_model(
    modelId="global.anthropic.claude-opus-5-5",
    contentType="application/json",
    accept="application/json",
    body=json.dumps({
        "anthropic_version": "bedrock-2023-05-31",
        "max_tokens": 4096,
        "messages": [
            {
                "role": "user",
                "content": "An S3 bucket serves 40 TB/month egress. Estimate the monthly egress cost at $0.09/GB, and state one architecture change to cut it. Show the calculation, keep it under 120 words."
            }
        ]
    })
)

result = json.loads(response["body"].read())
# Opus 5.5 is a reasoning model: the response may include a thinking block
# before the text block, so select the text block rather than a fixed index.
print(next(b["text"] for b in result["content"] if b["type"] == "text"))

你也可以使用 Amazon Bedrock Converse API 获得统一的多模型体验:

import boto3

# Create a Bedrock Runtime client
bedrock_runtime = boto3.client(
    service_name="bedrock-runtime",
    region_name="us-east-1"
)

# Invoke Claude Opus 5.5
response = bedrock_runtime.converse(
    modelId="global.anthropic.claude-opus-5-5",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "text": "Can you explain the features of Amazon Bedrock?"
                }
            ]
        }
    ],
    inferenceConfig={
        "maxTokens": 4096
    }
)

if 'output' in response:
    blocks = response['output']['message']['content']
    print('\n'.join(b.get('text', '') for b in blocks if 'text' in b))

你也可以通过 anthropic SDK 包使用 Anthropic Messages API,获得简化的体验:

from anthropic import Anthropic
from aws_bedrock_token_generator import provide_token

token = provide_token(region="us-east-1")

client = Anthropic(
    base_url="https://bedrock-runtime.us-east-1.amazonaws.com/anthropic",
    api_key=token,
)

# Invoke Claude Opus 5.5
response = client.messages.create(
    model="global.anthropic.claude-opus-5-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Can you explain the features of Amazon Bedrock?"}],
)
print(response)

你可以浏览 Getting Started notebook 了解更多示例。你可以通过 Amazon CloudWatch 和 AWS Cost Explorer 监控使用情况、性能和成本,以便随着需求增长扩展你的应用程序。

可用性

Claude Opus 5.5 现已在 Amazon Bedrock 上通过 bedrock-runtime 的 US Geo CRIS ( us. )、EU Geo CRIS ( eu. )、AU Geo CRIS ( au. )、JP Geo CRIS ( jp. ) 和 Global CRIS ( global. ) 推理配置文件提供。该模型还在 bedrock-mantle 上的 US East (N. Virginia) Region ( us-east-1 )、AP SouthEast (Melbourne) Region ( ap-southeast-4 ) 中运行。

请参阅 Amazon Bedrock 文档以获取支持区域的完整列表。有关定价信息,请参阅 Amazon Bedrock pricing 。它也可通过北美的 Claude Platform on AWS 使用。

在 Amazon Bedrock 控制台、AWS 上的 Claude Platform 中试用 Claude Opus 5.5,或探索 GitHub 上的入门笔记本。



转载声明:本文为转载整理,原文版权归原作者及原站点所有。

原文来源:AWS Machine Learning Blog

原创地址:https://aws.amazon.com/blogs/machine-learning/claude-opus-5-5-is-now-available-on-aws/

原文作者:Aamna Najmi;如有侵权,请联系管理员删除。

请登录后发表评论 登录
全部评论

注册时间:2022-11-21

  • 博文量
    1090
  • 访问量
    546593