资讯 文档
技术能力
语音技术
文字识别
人脸与人体
图像技术
语言与知识
视频技术

metadata补充说明

本文档对有特殊意义的metadata字段进行补充说明

Run模块中的metadata

option.output.message.stream.mode

含义

【可选】控制流式接口返回message的时候是否返回消息的片段。默认false。

生效接口

threads/runs

示例

 "metadata" : {
     "option.output.message.stream.mode":"true"
 }

config.run.total.timeout.seconds

含义

【可选】配置整个run的超时时间(以秒为单位),最少10秒,最长600秒。无效数字或超出范围时将抛异常。默认600秒。超出范围时取对应的边界值。

生效接口

threads/runs

示例

 "metadata" : {
    "config.run.total.timeout.seconds":"120"
 }

配置不合法时报错示例

{
    "error": {
        "message": "config.run.total.timeout.seconds is not in range of [10, 600]",
        "type": "无效参数异常",
        "param": null,
        "code": 2003
    }
}

config.run.requires.action.timeout.seconds

含义

【可选】配置run过程中requires_action时等待的超时时间(以秒为单位)最少10秒,最长120秒。

无效数字或超出范围时将抛异常。超出剩余可执行时间时,以剩余可执行时间为上限。默认根据执行时间计算,最长等待120秒。

生效接口

threads/runs

示例

"metadata" : {
    "config.run.requires.action.timeout.seconds":"60"
}

配置不合法时报错示例

{
    "error": {
        "message": "config.run.requires.action.timeout.seconds is not in range of [10, 120]",
        "type": "无效参数异常",
        "param": null,
        "code": 2003
    }
}

config.run.max.steps

含义

【可选】配置run过程step的最多调用次数。最少2次,最多30次。

无效数字或超出范围时将抛异常。默认10次。

生效接口

threads/runs

示例

"metadata" : {
    "config.run.max.steps":"5"
}

配置不合法时报错示例

{
    "error": {
        "message": "config.run.max.steps is not in range of [2, 30]",
        "type": "无效参数异常",
        "param": null,
        "code": 2003
    }
}