Accessing the text calling the intent from within the intent

I have been trying to call looking for a way for my local LLM to call GPT from within home assistant under specific circumstances. My latest attempt was to set up an intent script and attempt to pass the query through to it as a parameter, this had limited success with about 3 words on a good run. I am curious if the actual text from the calling of the intent can be accessed preferably the whole thing similar to the debugging engine in the assist pipeline.