Skip to content

fix: Add raw_generated_gql to intermediate_steps when verify_gql is True#174

Merged
averikitsch merged 2 commits intogoogleapis:mainfrom
jordimas:issue_173
Jul 22, 2025
Merged

fix: Add raw_generated_gql to intermediate_steps when verify_gql is True#174
averikitsch merged 2 commits intogoogleapis:mainfrom
jordimas:issue_173

Conversation

@jordimas
Copy link
Copy Markdown
Contributor

@jordimas jordimas commented May 3, 2025

Fixes issue #173

@jordimas jordimas requested review from a team May 3, 2025 13:13
@product-auto-label product-auto-label Bot added the api: spanner Issues related to the googleapis/langchain-google-spanner-python API. label May 3, 2025
@jordi-mas-dj
Copy link
Copy Markdown

cc: @mtyin

@gauravpurohit06 gauravpurohit06 requested a review from mtyin May 5, 2025 05:14
generated_gql = extract_gql(gen_response)

if self.verify_gql:
intermediate_steps.append({"raw_generated_gql": generated_gql})
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You may want to move this right above L314: intermediate_steps.append({"verified_gql": verified_gql}).

As in other cases, generated_gql is already part of the intermediate_steps.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure. Done. Makes sense also from a consumer point of view, if you have verified_gql you will have raw_generated_gql.

Copy link
Copy Markdown
Contributor

@mtyin mtyin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for making the change!

@jordimas
Copy link
Copy Markdown
Contributor Author

jordimas commented May 8, 2025

Rewrote commit message to pass Conventional Commits

@jordimas jordimas requested a review from mtyin May 8, 2025 17:14
@averikitsch
Copy link
Copy Markdown
Collaborator

/gcbrun

@averikitsch averikitsch changed the title Add raw_generated_gql to intermediate_steps when verify_gql is True fix: Add raw_generated_gql to intermediate_steps when verify_gql is True May 13, 2025
@mtyin
Copy link
Copy Markdown
Contributor

mtyin commented May 23, 2025

/gcbrun

@mtyin
Copy link
Copy Markdown
Contributor

mtyin commented May 23, 2025

/gcbrun

2 similar comments
@mtyin
Copy link
Copy Markdown
Contributor

mtyin commented May 29, 2025

/gcbrun

@mtyin
Copy link
Copy Markdown
Contributor

mtyin commented May 29, 2025

/gcbrun

@averikitsch
Copy link
Copy Markdown
Collaborator

/gcbrun

@averikitsch averikitsch merged commit d74f040 into googleapis:main Jul 22, 2025
11 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/langchain-google-spanner-python API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants