Skip to content

schema

Modules:

Classes:

LLMDiagnosis

Bases: BaseModel

Methods:

from_llm classmethod

from_llm(text: str) -> 'LLMDiagnosis'
Source code in src/hiperhealth/schema/clinical_outputs.py
@classmethod
def from_llm(cls, text: str) -> 'LLMDiagnosis':
    """
    title: Parse a JSON string generated by our medical LLM.
    parameters:
      text:
        type: str
        description: Value for text.
    returns:
      type: LLMDiagnosis
      description: Return value.
    """
    return cls.model_validate_json(_clean_json_text(text))