generation

Generate Answer Endpoint

Generate a narrative answer using AI.

Args: request: GenerateAnswerRequest with question, context, and options

Returns: GenerateAnswerResponse with generated answer and metadata

Raises: HTTPException: 400 for validation errors, 500 for generation failures

post/api/generate-narrative-answer

Request body

questionstring required
report_idinteger required
descriptionstring nullable
contextstring[] nullable
previous_answerstring nullable
stylestring
max_lengthinteger

Response

Successful Response

successboolean required
generated_answerstring required
word_countinteger required
processing_time_secondsnumber required
refined_promptstring nullable
responses_countinteger
template_usedboolean
errorstring nullable

Changes