类 Present.Builder

java.lang.Object
com.lark.oapi.service.search.v2.model.Present.Builder
封闭类:
Present

public static class Present.Builder extends Object
  • 构造器详细资料

    • Builder

      public Builder()
  • 方法详细资料

    • type

      public Present.Builder type(String type)
      透传数据类型

      示例值:card

      参数:
      type -
      返回:
    • type

      透传数据类型

      示例值:card

      参数:
      type - PresentPresentTypeEnum
      返回:
    • body

      public Present.Builder body(String body)
      透传消息体

      示例值:raw

      参数:
      body -
      返回:
    • operationType

      public Present.Builder operationType(String operationType)
      在交互卡片的场景下,如果用户完成交互,根据交互行为 Tool 对该交互行为做出的响应

      示例值:UPDATE

      参数:
      operationType -
      返回:
    • operationType

      public Present.Builder operationType(PresentOperationTypeEnum operationType)
      在交互卡片的场景下,如果用户完成交互,根据交互行为 Tool 对该交互行为做出的响应

      示例值:UPDATE

      参数:
      operationType - PresentOperationTypeEnum
      返回:
    • interactable

      public Present.Builder interactable(Boolean interactable)
      用来定义工具输出的卡片是否为交互卡片

      示例值:true

      参数:
      interactable -
      返回:
    • operationUrl

      public Present.Builder operationUrl(String operationUrl)
      卡片后续链路交互的请求地址

      示例值:https://open.feishu-boe.cn/open-apis/lark_ai/operation

      参数:
      operationUrl -
      返回:
    • callbackUrl

      public Present.Builder callbackUrl(String callbackUrl)
      透传数据上屏后,回调业务方的 url;支持 Open API 与 RPC 两种方式

      示例值:Open API - https://open.feishu-boe.cn/open-apis/lark_ai/callback;RPC - sd://p.s.m

      参数:
      callbackUrl -
      返回:
    • callbackInfo

      public Present.Builder callbackInfo(String callbackInfo)
      透传数据上屏后,回调给业务方的数据,仅在 type = card 时会回调

      示例值:可以是纯文本:"callback raw data";也可以是 json string:"{\"biz_id":\"search_context_id\"}"

      参数:
      callbackInfo -
      返回:
    • cardTemplateId

      public Present.Builder cardTemplateId(String cardTemplateId)
      仅 type = template_card 时使用,代表模版卡片的模版信息

      示例值:default

      参数:
      cardTemplateId -
      返回:
    • cardVariables

      public Present.Builder cardVariables(TemplateCardVariables cardVariables)
      仅 type = template_card 使用,对应到模版卡片中模版里的变量信息,类型应该是map无效输入:'<'string, string>

      示例值:

      参数:
      cardVariables -
      返回:
    • build

      public Present build()