Skip to content

Nihai Regenerate Search Endpoint

Regenerate an entry using Perplexity with feedback instructions and run openai_eval.

Payload:
{
    "question": str (new question from user),
    "feedback": str (doctor's feedback/instructions),
    "old_uuid": str (UUID of entry to delete before regenerating),
    "old_question": str (original question),
    "old_answer": str (original answer),
    "old_openai_eval": str (original evaluation JSON string, optional),
    "collection": str?,
    "condition_area": str?,
    "topic": str?,
    "max_tokens": int?
}

API Reference

Endpoint: POST /search/nihai/regenerate

Example Usage

curl -X POST http://localhost:8000/search/nihai/regenerate \
  -H 'Content-Type: application/json' \
  -d '{'query': 'What are symptoms of high blood pressure?', 'max_results': 3}'