1. TypeSafe
梧柏API使用文档
WHBAI · TypeSafe
  • WHBAI · Google Gemini 原生 (v1alpha)
  • WHBAI · Google Gemini 原生
  • WHBAI · Ideogram
  • WHBAI · Ideogram V3
  • WHBAI · Midjourney
  • WHBAI · Jimeng
  • WHBAI · Kling
  • WHBAI · Luma
  • WHBAI · Luma V1
  • WHBAI · Omni 视频
  • WHBAI · Pixverse
  • WHBAI · Runway
  • WHBAI · Sora2
  • WHBAI · 统一视频 VEO
  • WHBAI · Vidu
  • WHBAI · 豆包 Volc
  • WHBAI · Suno
  • WHBAI · Playground
  • WHBAI · 账号与令牌
  • WHBAI · 阿里 Pix
  • WHBAI · 阿里百炼
  • WHBAI · 私域人像
  • WHBAI · Fal.ai
  • WHBAI · Replicate
  • WHBAI · 腾讯云 VOD
  • WHBAI · MiniMax
  • WHBAI · 支持模型列表
  • WHBAI · Grok Imagine
  • WHBAI · Seedance 2.0
  • WHBAI · TypeSafe
  • WHBAI · OpenAI 兼容
  • TypeSafe
    • 评估状态
      POST
  • 数据模型
    • TypeSafeEvaluateRequest
    • TypeSafeState
    • TypeSafeQuestion
    • TypeSafeNoulQuestion
    • TypeSafeChoiceQuestion
    • TypeSafeScoreQuestion
    • TypeSafeStructuredText
    • TypeSafeNoulCriteria
    • TypeSafeChoiceCriteria
    • TypeSafeScoreCriteria
    • TypeSafeEvaluateResponse
    • TypeSafeAnswer
    • TypeSafeNoulAnswer
    • TypeSafeChoiceAnswer
    • TypeSafeScoreAnswer
    • TypeSafeUsage
    • NewApiError
  1. TypeSafe

评估状态

POST
/v1/systemone
用一组带类型的问题评估 state。answers 的键与请求里的问题 id 相同。同一次请求可以混用三种问题:
noul:是/否。返回答案为「是」的概率,范围 0 到 1。
choice:从你定义的选项里选一个,并返回完整概率分布。每个 Choice 最多 255 个选项。
score:按有序等级打分,返回概率加权后的分数,可以落在两个等级之间。等级至少 2 个,最多 10 个。
instructions 可以是字符串、对象或数组。对象适合把问题和它要引用的数据拆开,在问题里用反引号标出字段名,例如 `potential_duplicate`。
鉴权使用API 令牌:Authorization: Bearer sk-...。Content-Type 为 application/json。

网站中的模型与调用示例#

评估状态#

用一组带类型的问题评估 state。answers 的键与请求里的问题 id 相同。同一次请求可以混用三种问题:
noul:是/否。返回答案为「是」的概率,范围 0 到 1。
choice:从你定义的选项里选一个,并返回完整概率分布。每个 Choice 最多 255 个选项。
score:按有序等级打分,返回概率加权后的分数,可以落在两个等级之间。等级至少 2 个,最多 10 个。
instructions 可以是字符串、对象或数组。对象适合把问题和它要引用的数据拆开,在问题里用反引号标出字段名,例如 `potential_duplicate`。
鉴权使用云雾 API 令牌:Authorization: Bearer sk-...。Content-Type 为 application/json。

请求示例 · 一次问完三种题#

{
  "model": "jev-latest",
  "questions": {
    "department": {
      "criteria": {
        "billing": "Payments, invoicing, refunds",
        "sales": "Pricing, upgrades, new accounts",
        "technical": "Bugs, outages, integrations"
      },
      "instructions": "Which team should handle this?",
      "type": "choice"
    },
    "frustration": {
      "criteria": [
        "Calm",
        "Frustrated",
        "Very angry"
      ],
      "instructions": "How frustrated is the customer?",
      "type": "score"
    },
    "is_urgent": {
      "criteria": {
        "false": "No urgency expressed",
        "true": "Explicitly time-sensitive"
      },
      "instructions": "Does this convey urgency?",
      "type": "noul"
    }
  },
  "state": "Help! My payouts have been failing for 3 days."
}

请求示例 · 分到哪个团队#

{
  "model": "jev-latest",
  "questions": {
    "department": {
      "criteria": {
        "billing": "Payments",
        "sales": "Pricing and upgrades",
        "technical": "Bugs and outages"
      },
      "instructions": {
        "question": "Which team?"
      },
      "type": "choice"
    }
  },
  "state": {
    "message": "Need help"
  }
}

请求示例 · 是否紧急#

{
  "model": "jev-latest",
  "questions": {
    "is_urgent": {
      "criteria": {
        "false": "No urgency expressed",
        "true": "Explicitly time-sensitive"
      },
      "instructions": "Does this convey urgency?",
      "type": "noul"
    }
  },
  "state": "Help! My payouts have been failing for 3 days."
}

请求示例 · 紧急程度打分#

{
  "model": "jev-latest",
  "questions": {
    "frustration": {
      "criteria": [
        "Calm",
        "Frustrated",
        "Very angry"
      ],
      "instructions": "How frustrated is the customer?",
      "type": "score"
    }
  },
  "state": [
    "payment failed",
    "today"
  ]
}

请求示例 · 问题里引用一份资料#

{
  "model": "jev-latest",
  "questions": {
    "same_person": {
      "instructions": {
        "potential_duplicate": {
          "last_employer": "Google",
          "location": "Oakland, California",
          "name": "John Smith"
        },
        "question": "Is the resume for the same person as `potential_duplicate`?"
      },
      "type": "noul"
    }
  },
  "state": "John Smith, software engineer, previously at Google in the Bay Area."
}

tags#

[
  "TypeSafe"
]

请求参数

Authorization
Bearer Token
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
or
Body 参数application/json必填

示例
{
    "model": "jev-latest",
    "questions": {
        "department": {
            "criteria": {
                "billing": "Payments, invoicing, refunds",
                "sales": "Pricing, upgrades, new accounts",
                "technical": "Bugs, outages, integrations"
            },
            "instructions": "Which team should handle this?",
            "type": "choice"
        },
        "frustration": {
            "criteria": [
                "Calm",
                "Frustrated",
                "Very angry"
            ],
            "instructions": "How frustrated is the customer?",
            "type": "score"
        },
        "is_urgent": {
            "criteria": {
                "false": "No urgency expressed",
                "true": "Explicitly time-sensitive"
            },
            "instructions": "Does this convey urgency?",
            "type": "noul"
        }
    },
    "state": "Help! My payouts have been failing for 3 days."
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location '/v1/systemone' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "model": "jev-latest",
    "questions": {
        "department": {
            "criteria": {
                "billing": "Payments, invoicing, refunds",
                "sales": "Pricing, upgrades, new accounts",
                "technical": "Bugs, outages, integrations"
            },
            "instructions": "Which team should handle this?",
            "type": "choice"
        },
        "frustration": {
            "criteria": [
                "Calm",
                "Frustrated",
                "Very angry"
            ],
            "instructions": "How frustrated is the customer?",
            "type": "score"
        },
        "is_urgent": {
            "criteria": {
                "false": "No urgency expressed",
                "true": "Explicitly time-sensitive"
            },
            "instructions": "Does this convey urgency?",
            "type": "noul"
        }
    },
    "state": "Help! My payouts have been failing for 3 days."
}'

返回响应

🟢200成功
application/json
评估完成。model 是实际执行的版本,可能与请求里的别名不同,例如请求 jev-latest 时返回 jev-1.13.0。
Bodyapplication/json

示例
{
    "answers": {
        "department": {
            "choice": "billing",
            "confidence": 0.81,
            "probabilities": {
                "billing": 0.88,
                "sales": 0,
                "technical": 0.12
            },
            "type": "choice"
        },
        "frustration": {
            "confidence": 0.92,
            "legend": {
                "0": "Calm",
                "1": "Frustrated",
                "2": "Very angry"
            },
            "probabilities": {
                "0": 0,
                "1": 0.95,
                "2": 0.05
            },
            "score": 1.05,
            "type": "score"
        },
        "is_urgent": {
            "noul": 0.95,
            "type": "noul"
        }
    },
    "model": "jev-1.13.0",
    "usage": {
        "input_tokens": 318,
        "output_tokens": 34
    }
}
🟠400请求有误
🟠401没有权限
修改于 2026-10-24 18:33:22
下一页
TypeSafeEvaluateRequest
Built with