Skip to content

Fix display of the artifact created by a tool #294

@slilichenko

Description

@slilichenko

A tool ("get_incident_data) which has the following code

    await tool_context.save_artifact("incident_data",
                                     Part(inline_data=Blob(
                                         display_name=f"Full data for incident {incident_id}",
                                         mime_type="text/json",
                                         data=full_data.model_dump_json().encode(
                                             "utf-8"))))

displays the follow widget in the UI:

Image

The button name is not the actual artifact name/description. Clicking on the button results in a pop-up stating "Could not open the data. It might be invalid or too large. Check the browser console for errors.". The actual data in this case is very small.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions