Briyah SDK - v2.0.6
    Preparing search index...

    Function stripWrappingFence

    • Unwraps a response the model fenced as one ```markdown block.

      The prompt asks for bare Markdown and mostly gets it, but a page comes back wrapped often enough that the fence markers end up as literal content in the artifact. Only a fence that opens at the very start and closes at the very end is stripped, so a page whose real content is a code block is left alone.

      Parameters

      • text: string

        The model's response

      Returns string

      The response with a wrapping fence removed