类 DashScopeOutput

java.lang.Object
io.agentscope.core.formatter.dashscope.dto.DashScopeOutput

public class DashScopeOutput extends Object
DashScope output DTO.

This class represents the output section of a DashScope API response.

Example JSON:


 {
   "choices": [
     {
       "message": {...},
       "finish_reason": "stop"
     }
   ],
   "finish_reason": "stop"
 }
 
  • 构造器详细资料

    • DashScopeOutput

      public DashScopeOutput()
  • 方法详细资料

    • getChoices

      public List<DashScopeChoice> getChoices()
    • setChoices

      public void setChoices(List<DashScopeChoice> choices)
    • getFinishReason

      public String getFinishReason()
    • setFinishReason

      public void setFinishReason(String finishReason)
    • getText

      public String getText()
    • setText

      public void setText(String text)
    • getFirstChoice

      public DashScopeChoice getFirstChoice()
      Get the first choice if available.
      返回:
      the first choice, or null if no choices