[]
        
(Showing Draft Content)

AIModelResponse

Class AIModelResponse

java.lang.Object
com.grapecity.documents.excel.AIModelResponse

public class AIModelResponse extends Object
Represents the result of an AI model request.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initializes a new instance of the ModelResponse class.
    AIModelResponse(boolean success, String content)
    Initializes a new instance of the ModelResponse class with the specified success status and content.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the response content from the model.
    boolean
    Gets a value indicating whether the request was successful.
    void
    setContent(String content)
    Sets the response content from the model.
    void
    setSuccess(boolean success)
    Sets a value indicating whether the request was successful.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AIModelResponse

      public AIModelResponse()
      Initializes a new instance of the ModelResponse class.
    • AIModelResponse

      public AIModelResponse(boolean success, String content)
      Initializes a new instance of the ModelResponse class with the specified success status and content.
      Parameters:
      success - Whether the request was successful.
      content - The response content from the model.
  • Method Details

    • isSuccess

      public boolean isSuccess()
      Gets a value indicating whether the request was successful.
    • setSuccess

      public void setSuccess(boolean success)
      Sets a value indicating whether the request was successful.
    • getContent

      public String getContent()
      Gets the response content from the model.
    • setContent

      public void setContent(String content)
      Sets the response content from the model. The content should be a well-formed JSON 2D array string without additional explanatory text. This ensures direct compatibility with spreadsheet cell ranges. Sample: [["Result1", "Result2"], ["Result3", "Result4"]] or [["result"]]