QuestionResponse - agents API reference (0.0.10)

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# QuestionResponse

class inmydata.ConversationalData.QuestionResponse(answer: str, dataFrame: DataFrame, subject: str)

  Bases: `object`

  A data class for providing a structured response to a question. This class provides a string and a dataframe property to return a both a string and dataframe in response to a question.

  answer

    The string response to the question.

    Type:

      str

  dataFrame

    The pandas DataFrame containing the structured data in response to the question.

    Type:

      pd.DataFrame

  subject

    The subject of the question, which can be used to generate the answer.

    Type:

      str

  ## Members

  toJSON()

    Returns a JSON representation of the QuestionResponse object.

    Returns:

      A JSON string representation of the QuestionResponse object.

    Return type:

      str