providerplaneai
    Preparing search index...

    Function normalizeOCRAnnotationText

    • Normalizes OCR annotation text while suppressing prompt-echo responses.

      Some providers return the original annotation prompt verbatim instead of the parsed annotation payload. When that happens and structured annotation data is available, the structured payload is serialized instead so the artifact still carries useful content.

      Parameters

      • text: string | undefined

        Provider annotation text.

      • data: Record<string, unknown> | unknown[] | undefined

        Structured annotation payload when present.

      • annotationPrompt: string | undefined

        Prompt used to request annotation output.

      Returns string | undefined

      The normalized annotation text payload.