Skip to content

Conversation

@efunneko
Copy link
Collaborator

@efunneko efunneko commented Aug 5, 2025

Some things fixed:

  • There were various issues with the extraction of text from a JSON field and then converting that text to a csv file
  • Sometimes the LLM would call artifact functions with json text. Now just always expect JSON text
  • Be more resilient if an artifact version is specified as a string

@efunneko efunneko requested a review from gregmeldrum August 5, 2025 18:18
@efunneko efunneko changed the title DATAGO-108136: Fix the extraction of CSV data from a JSON field DATAGO-108136: Fix the extraction of CSV data from a JSON field Aug 5, 2025
@efunneko efunneko requested a review from Copilot August 5, 2025 18:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses issues with extracting CSV data from JSON fields and improves the robustness of artifact handling. The primary goal is to fix various problems that occur when LLMs attempt to extract text from JSON fields and convert that text to CSV format.

  • Enhanced JSONPath processing to unwrap single-element arrays for more intuitive behavior
  • Added intelligent CSV detection and parsing for embedded CSV content within JSON strings
  • Updated artifact tool parameter handling to accept JSON strings instead of objects and improved version validation

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/solace_agent_mesh/common/utils/embeds/modifiers.py Adds single-element array unwrapping in JSONPath processing
src/solace_agent_mesh/common/utils/embeds/converter.py Implements embedded CSV detection/parsing and enhanced serialization logic
src/solace_agent_mesh/agent/tools/builtin_artifact_tools.py Changes metadata parameter from object to JSON string and adds version string validation
src/solace_agent_mesh/agent/adk/callbacks.py Updates artifact block delimiters and documentation examples
Multiple test files Updates expected outputs to reflect new single-element unwrapping behavior

@github-actions
Copy link

github-actions bot commented Aug 5, 2025

WhiteSource Policy Violation Summary

❌ Following blocking Whitesource Policy Violations must be resolved in solaceai/solace-agent-mesh-pr-207

  • audioop_lts-0.2.2-cp313-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Follow this runbook to fix issues in your Whitesource project.

Copy link
Collaborator

@gregmeldrum gregmeldrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good! Just 1 comment about csv validation.


# Check that lines contain commas (basic CSV indicator)
for line in lines:
if "," not in line.strip():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can have csv without commas:

Name
Billy
Joe

@sonarqube-solacecloud
Copy link

@efunneko efunneko closed this Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants