Yes, see my example above. I use Node Red to get chat GPT and Home Assistant talking to each other.
No code required (unless you count the prompt template).
No code required (unless you count the prompt template).
Here's an export and screenshot of the flow (these links will expire in 2 weeks):
I use a few custom "nodes" to make it easy to query and parse the response though:
* node-red-contrib-string
* node-red-contrib-custom-chatgpt
* node-red-contrib-home-assistant-websocket
On the Home Assistant side, you'll need to create some "Helpers" or "input_number" entities and an "input_text" entity for the reason.
Hopefully that helps you get up and running.