Skip to content

数据模型: ClaudeRequest ​

ClaudeMessage ​

字段类型必选描述
rolestring是
contentany是

数据模型示例 ​

json
{
  "role": "string",
  "content": null
}

ClaudeRequest ​

字段类型必选描述
modelstring是
messagesarray of any是
systemany否
max_tokensinteger是
temperaturenumber否
top_pnumber否
top_kinteger否
streamboolean否
stop_sequencesarray of string否
toolsarray of object否
tools[].namestring否
tools[].descriptionstring否
tools[].input_schemaobject否
tool_choiceany否
thinkingobject否
thinking.typestring否
thinking.budget_tokensinteger否
metadataobject否
metadata.user_idstring否

数据模型示例 ​

json
{
  "model": "claude-3-opus-20240229",
  "messages": [
    {
      "role": "string",
      "content": null
    }
  ],
  "system": null,
  "max_tokens": 0,
  "temperature": 0,
  "top_p": 0,
  "top_k": 0,
  "stream": true,
  "stop_sequences": [
    "string"
  ],
  "tools": [
    {
      "name": "string",
      "description": "string",
      "input_schema": {}
    }
  ],
  "tool_choice": null,
  "thinking": {
    "type": "string",
    "budget_tokens": 0
  },
  "metadata": {
    "user_id": "string"
  }
}

Released under the MIT License.