how do I retrieve sql query from agent executor #31741
Replies: 1 comment
-
i got the code working now. actually there were intermediate queries involved and i was not capturing the final one. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I am trying to build an sql agent. It is otherwise working fine but I want the output to be formatted like EXCEL or PDF so I need to retrieve SQL Query used by the LLM. I tried to get it by following code
class SQLHandler(BaseCallbackHandler):
def init(self):
self.sql_result = None
but it is not working. As I am newbie, please guide.
System Info
Name Version Build Channel
langchain 0.3.26 pypi_0 pypi
langchain-community 0.3.26 pypi_0 pypi
langchain-core 0.3.66 pypi_0 pypi
langchain-openai 0.3.25 pypi_0 pypi
langchain-text-splitters 0.3.8 pypi_0 pypi
Platform Windows 11
python version 3.9.23
Beta Was this translation helpful? Give feedback.
All reactions