Skip to content

Add support for .toMarkdown() for OpenUI Responses #681

Description

@rabisg

Is your feature request related to a problem? Please describe.
When working with OpenUI responses it is beneficial to have a toMarkdown method for easier debuggability and/or storage for offline improvements. Since LLMs can handle markdown responses better than OpenUI responses it would be beneficial to have an easier way to convert OpenUI responses to markdown

Describe the solution you'd like
A simple toMarkdown() method on OpenUI responses that recursively parses the response and converts it to plaintext/markdown by stripping away the UI methods

Describe alternatives you've considered
We can manually implement this today by sending response back to a LLM and stripping away the UI format but this should be doable without needing a separate call

Additional context
n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions