活动
最新
False
- 概述
- Act! 365
- ActiveCampaign
- Adobe Acrobat Sign
- Adobe PDF 服务
- Amazon Bedrock
- Amazon Connect
- Amazon Polly
- Amazon SageMaker - 预览
- 关于 Amazon SageMaker 活动包
- 项目兼容性
- IJSONObject 类型对象
- 亚马逊 SES
- Amazon Transcribe
- Anthropic Claude
- Asana
- AWeber
- Azure Maps
- BambooHR
- Box
- Brevo
- Calendly
- Campaign Monitor
- Cisco Webex Teams
- Citrix ShareFile
- 清除位
- Confluence Cloud - 预览
- Constant Contact
- Coupa
- Customer.io
- Datadog
- Deputy - Preview
- Discord - 预览
- DocuSign
- 水滴
- Dropbox
- Dropbox Business
- Egnyte - Preview
- Epic FHIR R4 - 预览
- Eventbrite
- 汇率
- Expensify
- Facebook
- Freshservice
- Freshbooks
- Freshdesk
- 获取响应
- GitHub
- Google Maps
- Google Speat-to-Text - 预览
- Google 文本转语音
- Google Vertex
- Google Vision - 预览
- GoToWebinar
- Greenhouse
- Hootsuite
- HTTP Webhook
- Hubspot CRM - Preview
- Hubspot Marketing - Preview
- IBM WatsonX
- iContact
- Insightly CRM - Preview
- Intercom
- Jira
- Keap
- Klaviyo
- LinkedIn
- Mailchimp
- MailerLite
- Mailgun
- Marketo
- Microsoft Azure OpenAI
- Microsoft Dynamics CRM
- Microsoft Sentiment
- Microsoft Teams
- Microsoft Translator
- Microsoft Vision
- Miro
- 奥克塔
- OpenAI
- Oracle Eloqua
- Oracle NetSuite
- Paypal
- PDFMonkey
- Pinecone
- QuickBooks Online
- Quip
- Salesforce
- Salesforce Marketing Cloud
- SAP 构建流程自动化 - 预览
- SAP Cloud for Customer
- SAP Concur
- SendGrid
- ServiceNow
- Shopify
- Slack - 预览
- SmartRecruiters
- Smartsheet
- Snowflake
- Stripe
- Sugar Enterprise
- Sugar Professional
- Sugar Sell
- Sugar Serve
- 探戈卡
- Todoist
- Trello
- Twilio
- UiPath GenAI 活动 - 预览
- X(以前称为 Twitter)
- WOO COMMERCE
- 可行
- Workday
- Youtube
- Zendesk
- Zoho Campaigns - Preview
- Zoho Desk
- Zoho Mail - Preview
- 缩放
- Zoom 信息
Integration Service 活动
上次更新日期 2024年4月23日
IJSONObject 类型对象
使用 SageMaker ML 模型时,响应对象将以 JSON 格式返回,并且可能因所采用的模型而有很大差异。 用户需要在 Studio 中利用 Newtonsoft 的 JSON 库来遍历和处理来自 SageMaker 的 JSON 响应。 某些 ML 模型返回包含可作为字符串访问的单数值的响应字段,而其他 ML 模型包含可与标签匹配的多个概率数组。 一些示例包括:
示例 1
{ "probabilities": [ 0.994889379, 0.00511063961 ] }
{ "probabilities": [ 0.994889379, 0.00511063961 ] }
SageMaker 获取推理 步骤的响应需要保存为
IJSONObject
。 然后,可以在后续步骤中将此对象转换为 JObject
。 完成此操作后,您可以使用 Newtonsoft 提供的任何方法来解析和处理 JSON 数据。 查看 Example 1
,您可以执行 newres.ToJObject("probabilities").ToList(0)
来获取 0.994889379
的概率。
示例 2
{
"probabilities": [
0.000404331338,
0.000591270567,
0.000552555488,
0.000212208135,
0.00052378932,
...
0.990523789322
],
"labels": [
"background",
"tench",
"goldfish",
"great white shark",
"tiger shark",
...
"tabby"
],
"predicted_label": "tabby"
}
{
"probabilities": [
0.000404331338,
0.000591270567,
0.000552555488,
0.000212208135,
0.00052378932,
...
0.990523789322
],
"labels": [
"background",
"tench",
"goldfish",
"great white shark",
"tiger shark",
...
"tabby"
],
"predicted_label": "tabby"
}
根据您的基础 ML 模型,它可能会提供一个可供使用的单一值,如示例 2 中的
predicted_label
。在这种情况下,您可以执行 newres.ToJObject("predicted_label")
获取值 tabby
。
Studio 附带用于创建
ForEach
循环和 If
或 Then
条件的内置步骤。 JObject
查询可以与这些步骤结合使用,以创建功能更强大的工作流,如下例所示:
Newtonsoft.Json
库中的 JObject
类表示 JSON 对象。 它允许您在 Studio Web 中操作 JSON 数据。
以下是 JObject 类的一些最常用的方法:
Parse
:此方法用于将 JSON 对象的字符串表示解析为JObject
实例。ToString
:此方法返回 JSON 对象的字符串表示形式。Add
:此方法用于向 JSON 对象添加新属性。Remove
:此方法用于从 JSON 对象中删除属性。ContainsKey
:此方法返回一个布尔值,该值指示 JSON 对象是否包含具有指定键的属性。GetValue
:此方法返回具有指定键的属性值。SetValue
:此方法使用指定的键设置属性的值。Count
:此属性返回 JSON 对象中的属性数量。Properties
:此属性返回 JSON 对象中所有属性的集合。DeepClone
:此方法创建 JSON 对象的深层副本。