Interface AgentResponsesMultipartRequest


public interface AgentResponsesMultipartRequest

multipart/form-data body for a /responses request when files are attached. The JSON fields go in the payload part; files go in files parts.


Example to create an instance using the builder pattern

     AgentResponsesMultipartRequest agentResponsesMultipartRequest = AgentResponsesMultipartRequest.builder()
             .payload(payloadBuilder -> payloadBuilder)
             .build()
 
  • Method Details

    • getPayload

      @NotNull @Valid @NotNull @Valid AgentResponsesPayload getPayload()

      JSON document matching AgentResponsesPayload. Must include outputType and locale. At least one of prompt or files must be provided.

      Returns:
      payload
    • getFiles

      List<File> getFiles()

      Supporting files. Repeat this part for each file. Maximum of 3 files, 20 MB each. Allowed content types: application/pdf, text/plain, text/csv, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, message/rfc822, text/markdown, text/html.

      Returns:
      files
    • setPayload

      void setPayload(AgentResponsesPayload payload)

      JSON document matching AgentResponsesPayload. Must include outputType and locale. At least one of prompt or files must be provided.

      Parameters:
      payload - value to be set
    • setFiles

      void setFiles(File... files)

      Supporting files. Repeat this part for each file. Maximum of 3 files, 20 MB each. Allowed content types: application/pdf, text/plain, text/csv, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, message/rfc822, text/markdown, text/html.

      Parameters:
      files - values to be set
    • setFiles

      void setFiles(List<File> files)

      Supporting files. Repeat this part for each file. Maximum of 3 files, 20 MB each. Allowed content types: application/pdf, text/plain, text/csv, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, message/rfc822, text/markdown, text/html.

      Parameters:
      files - values to be set
    • of

      factory method
      Returns:
      instance of AgentResponsesMultipartRequest
    • of

      factory method to create a shallow copy AgentResponsesMultipartRequest
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

    • deepCopy

      @Nullable static AgentResponsesMultipartRequest deepCopy(@Nullable AgentResponsesMultipartRequest template)
      factory method to create a deep copy of AgentResponsesMultipartRequest
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for AgentResponsesMultipartRequest
      Returns:
      builder
    • builder

      create builder for AgentResponsesMultipartRequest instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withAgentResponsesMultipartRequest

      default <T> T withAgentResponsesMultipartRequest(Function<AgentResponsesMultipartRequest,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static tools.jackson.core.type.TypeReference<AgentResponsesMultipartRequest> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference