java.lang.Object
com.alibaba.dashscope.legacy_2x.threads.runs.Runs

@Deprecated public final class Runs extends Object
Deprecated.
The Assistants API (com.alibaba.dashscope.legacy_2x.threads.runs) is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
  • Constructor Details

    • Runs

      public Runs()
      Deprecated.
    • Runs

      public Runs(String baseUrl, ConnectionOptions connectionOptions)
      Deprecated.
  • Method Details

    • create

      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Create a thread run.
      Parameters:
      threadId - The thread id.
      param - The `RunParam`
      Returns:
      The `Run` object.
      Throws:
      ApiException - The request exception, if network connection issue etc.
      NoApiKeyException - Can not find a valid api key
      InputRequiredException - The threadId must input.
      InvalidateParameter - The input parameter is invalid.
    • createStream

      @Deprecated public io.reactivex.Flowable<AssistantStreamMessage> createStream(String threadId, RunParam param) throws ApiException, NoApiKeyException, InputRequiredException, InvalidateParameter
      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Create stream run, return Flowable of StreamMessage.
      Parameters:
      threadId - The run thread id
      param - The run parameters.
      Returns:
      The StreamMessage flowable.
      Throws:
      ApiException - The request failed.
      NoApiKeyException - No api key found.
      InputRequiredException - The threadId is null or empty.
      InvalidateParameter - The stream in param is false.
    • createStream

      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Create stream run, with event handler.
      Parameters:
      threadId - The run thread id
      param - The run parameters.
      handler - The assistant event handler.
      Throws:
      ApiException - The request failed.
      NoApiKeyException - No api key found.
      InputRequiredException - The threadId is null or empty.
      InvalidateParameter - The stream in param is false.
    • createThreadAndRun

      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Create thread and run.
      Parameters:
      param - The `ThreadAndRunParam` object.
      Returns:
      The `Run` object.
      Throws:
      ApiException - The request exception, if network connection issue etc.
      NoApiKeyException - Can not find a valid api key
      InvalidateParameter - The input parameter is invalid.
    • createStreamThreadAndRun

      @Deprecated public io.reactivex.Flowable<AssistantStreamMessage> createStreamThreadAndRun(ThreadAndRunParam param) throws ApiException, NoApiKeyException, InvalidateParameter
      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Create stream output and run.
      Parameters:
      param - The `ThreadAndRunParam` object with stream=true.
      Returns:
      Flowable of AssistantStreamMessage you can iterator the result.
      Throws:
      ApiException - The request exception, if network connection issue etc.
      NoApiKeyException - Can not find a valid api key
      InvalidateParameter - The input parameter is invalid.
    • createStreamThreadAndRun

      @Deprecated public void createStreamThreadAndRun(ThreadAndRunParam param, AssistantEventHandler handler) throws ApiException, NoApiKeyException, InvalidateParameter
      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Create stream output and run.
      Parameters:
      param - The `ThreadAndRunParam` object with stream=true.
      handler - The stream event handler callback.
      Throws:
      ApiException - The request exception, if network connection issue etc.
      NoApiKeyException - Can not find a valid api key
      InvalidateParameter - The input parameter is invalid.
    • update

      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Update the run.
      Parameters:
      threadId - The thread id.
      runId - The run id.
      param - The parameter.
      Returns:
      The updated `Run` object.
      Throws:
      ApiException - The request exception, if network connection issue etc.
      NoApiKeyException - Can not find a valid api key
      InputRequiredException - The thread id and run id are required.
    • list

      @Deprecated public ListResult<Run> list(String threadId, GeneralListParam listParam) throws ApiException, NoApiKeyException
      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      List the run of thread id.
      Parameters:
      threadId - the thread id.
      listParam - The list parameter.
      Returns:
      The list of `Run`.
      Throws:
      ApiException - The request exception, if network connection issue etc.
      NoApiKeyException - Can not find a valid api key
    • listSteps

      @Deprecated public ListResult<RunStep> listSteps(String threadId, String runId, GeneralListParam listParam) throws ApiException, NoApiKeyException
      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      List the run step of the run id.
      Parameters:
      threadId - The thread id
      runId - The run id.
      listParam - The list parameter.
      Returns:
      The list of 'RunStep'
      Throws:
      ApiException - The request exception, if network connection issue etc.
      NoApiKeyException - Can not find a valid api key
    • retrieve

      @Deprecated public Run retrieve(String threadId, String runId) throws ApiException, NoApiKeyException
      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Retrieve the run.
      Parameters:
      threadId - The thread id.
      runId - The run id.
      Returns:
      The `Run` object.
      Throws:
      ApiException - The request exception, if network connection issue etc.
      NoApiKeyException - Can not find a valid api key
    • retrieve

      @Deprecated public Run retrieve(String threadId, String runId, String apiKey) throws ApiException, NoApiKeyException
      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Retrieve the run.
      Parameters:
      threadId - The thread id.
      runId - The run id.
      apiKey - The request api key.
      Returns:
      The `Run` object.
      Throws:
      ApiException - The request exception, if network connection issue etc.
      NoApiKeyException - Can not find a valid api key
    • retrieve

      @Deprecated public Run retrieve(String threadId, String runId, String apiKey, Map<String,String> headers) throws ApiException, NoApiKeyException
      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Throws:
      ApiException
      NoApiKeyException
    • retrieveStep

      @Deprecated public RunStep retrieveStep(String threadId, String runId, String stepId) throws ApiException, NoApiKeyException
      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Retrieve the run step.
      Parameters:
      threadId - The thread id.
      runId - The run id.
      stepId - the run step id.
      Returns:
      The `RunStep` object.
      Throws:
      ApiException - The request exception, if network connection issue etc.
      NoApiKeyException - Can not find a valid api key
    • retrieveStep

      @Deprecated public RunStep retrieveStep(String threadId, String runId, String stepId, String apiKey) throws ApiException, NoApiKeyException
      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Retrieve the run step.
      Parameters:
      threadId - The thread id.
      runId - The run id.
      stepId - the run step id.
      apiKey - The request api key.
      Returns:
      The `RunStep` object.
      Throws:
      ApiException - The request exception, if network connection issue etc.
      NoApiKeyException - Can not find a valid api key
    • retrieveStep

      @Deprecated public RunStep retrieveStep(String threadId, String runId, String stepId, String apiKey, Map<String,String> headers) throws ApiException, NoApiKeyException
      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Throws:
      ApiException
      NoApiKeyException
    • submitToolOutputs

      @Deprecated public Run submitToolOutputs(String threadId, String runId, SubmitToolOutputsParam param) throws ApiException, NoApiKeyException, InputRequiredException
      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Submit tool outputs.
      Parameters:
      threadId - The thread id.
      runId - The run id.
      param - The output parameters.
      Returns:
      The `Run` object.
      Throws:
      ApiException - The request exception, if network connection issue etc.
      NoApiKeyException - Can not find a valid api key
      InputRequiredException - The thread id and run id must input.
    • submitStreamToolOutputs

      @Deprecated public io.reactivex.Flowable<AssistantStreamMessage> submitStreamToolOutputs(String threadId, String runId, SubmitToolOutputsParam param) throws ApiException, NoApiKeyException, InputRequiredException
      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Submit tool outputs, and return stream result.
      Parameters:
      threadId - The thread id.
      runId - The run id.
      param - The output parameters.
      Returns:
      The stream assistant stream messages.
      Throws:
      ApiException - The request exception, if network connection issue etc.
      NoApiKeyException - Can not find a valid api key
      InputRequiredException - The thread id and run id must input.
    • submitStreamToolOutputs

      @Deprecated public void submitStreamToolOutputs(String threadId, String runId, SubmitToolOutputsParam param, AssistantEventHandler handler) throws ApiException, NoApiKeyException, InputRequiredException
      Deprecated.
      The Assistants API is deprecated and will be removed in a future release. Please migrate to the Responses API. See https://help.aliyun.com/zh/model-studio/synchronous-call-api-reference for migration details.
      Submit tool outputs, and return stream result.
      Parameters:
      threadId - The thread id.
      runId - The run id.
      param - The output parameters.
      handler - The stream event handler callback.
      Throws:
      ApiException - The request exception, if network connection issue etc.
      NoApiKeyException - Can not find a valid api key
      InputRequiredException - The thread id and run id must input.