-
Notifications
You must be signed in to change notification settings - Fork 1
Text Generation
James edited this page May 10, 2026
·
4 revisions
Text Generation services support Home Assistant Assist, AI Tasks, and direct automation calls through response services.
- Use the generated Conversation entity with Assist.
- Use the generated AI Task entity for data generation.
- Call
groq.generate_textfrom scripts and automations. - Call
groq.generate_structuredwhen an automation needs JSON that follows a schema.
action: groq.generate_text
data:
prompt: Summarize the current home status for a dashboard notification.
model: llama-3.1-8b-instant
temperature: 0.2
response_variable: groq_textThe Text Generation setup flow includes options for:
- model
- system prompt
- temperature
- maximum completion tokens
- top-p
- stop sequences
- seed
- service tier
- streaming Assist responses
- reasoning effort and reasoning format for supported models
- prompt caching for supported models
- structured outputs for supported models
- additional request body options
Use request_body_options for Groq chat completion fields that are not exposed as dedicated Home Assistant controls.
action: groq.generate_text
data:
prompt: Create a short goodnight message.
model: openai/gpt-oss-20b
request_body_options:
user: home-assistant
metadata:
workflow: bedtime
response_variable: groq_textUse groq.generate_structured when you want the response to follow a JSON Schema.
action: groq.generate_structured
data:
prompt: Extract the room, device, and requested action from "turn off the kitchen lights".
model: openai/gpt-oss-20b
strict: true
schema_name: home_intent
schema:
type: object
properties:
room:
type: string
device:
type: string
action:
type: string
required:
- room
- device
- action
additionalProperties: false
response_variable: groq_structuredThe setup flow prefers live Groq model discovery. If discovery is unavailable, the integration has built-in fallback model IDs including:
llama-3.1-8b-instantllama-3.3-70b-versatileopenai/gpt-oss-20bopenai/gpt-oss-120bopenai/gpt-oss-safeguard-20bqwen/qwen3-32bgroq/compoundgroq/compound-mini
Reasoning and prompt caching options are only offered for models known to support them.