mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Fixed CodeRebbit comments
This commit is contained in:
parent
6d8d8c79a3
commit
1f17b1814a
@ -165,13 +165,14 @@ Allows you to ask OpenAI to generate a content based on a prompt. This service
|
|||||||
populates [Response Data](/docs/scripts/service-calls#use-templates-to-handle-response-data)
|
populates [Response Data](/docs/scripts/service-calls#use-templates-to-handle-response-data)
|
||||||
with the response from OpenAI.
|
with the response from OpenAI.
|
||||||
|
|
||||||
| Service data attribute | Optional | Description | Example |
|
| Service data attribute | Optional | Description | Example |
|
||||||
| ---------------------- | -------- | ------------------------------------------------------- | ---------------- |
|
| ---------------------- | -------- | ------------------------------------------------------- | -------------------- |
|
||||||
| `config_entry` | no | Integration entry ID to use. | |
|
| `config_entry` | no | Integration entry ID to use. | |
|
||||||
| `prompt` | no | The text to turn into an image. | Picture of a dog |
|
| `prompt` | no | The text to generate content from. | Describe the weather |
|
||||||
| `image_filename` | yes | List of file names for images to include in the prompt. | /tmp/image.jpg |
|
| `image_filename` | yes | List of file names for images to include in the prompt. | /tmp/image.jpg |
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
service: openai.generate_content
|
service: openai.generate_content
|
||||||
data:
|
data:
|
||||||
@ -184,6 +185,7 @@ data:
|
|||||||
- /tmp/doorbell_snapshot.jpg
|
- /tmp/doorbell_snapshot.jpg
|
||||||
response_variable: generated_content
|
response_variable: generated_content
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
The response data field `text` will contain the generated content.
|
The response data field `text` will contain the generated content.
|
||||||
@ -191,6 +193,7 @@ The response data field `text` will contain the generated content.
|
|||||||
Another example with multiple images:
|
Another example with multiple images:
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
service: openai.generate_content
|
service: openai.generate_content
|
||||||
data:
|
data:
|
||||||
@ -204,4 +207,5 @@ data:
|
|||||||
- /tmp/driveway_snapshot4.jpg
|
- /tmp/driveway_snapshot4.jpg
|
||||||
response_variable: generated_content
|
response_variable: generated_content
|
||||||
```
|
```
|
||||||
{% endraw %}
|
|
||||||
|
{% endraw %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user