Hi,
I’d like to give assist a dynamic api url. The url should be based on stt slot. That’s what I tried with rest_command. It executes correctly but no output
rest_command:
wiki_get_rawdata:
url: "https://de.wikipedia.org/api/rest_v1/page/summary/{{ url }}"
method: GET
content_type: 'application/json; charset=utf-8'
intent_script:
Wikipedia:
action:
- service: "rest_command.wiki_get_rawdata"
data:
url: "{{ name }}"
response_variable: summary
speech:
text: "{{ summary }}"
custom sentence:
language: de
intents:
Wikipedia:
data:
- sentences:
- "suche {name}"
- "was ist {name}"
lists:
name:
wildcard: true
example output if rest called alone:
content:
type: standard
title: Hauskatze
displaytitle: <span class="mw-page-title-main">Hauskatze</span>
namespace:
id: 0
text: ""
wikibase_item: Q146
titles:
canonical: Hauskatze
normalized: Hauskatze
display: <span class="mw-page-title-main">Hauskatze</span>
pageid: 18747
thumbnail:
source: >-
https://upload.wikimedia.org/wikipedia/commons/thumb/8/8e/Hauskatze_langhaar.jpg/320px-Hauskatze_langhaar.jpg
width: 320
height: 239
originalimage:
source: https://upload.wikimedia.org/wikipedia/commons/8/8e/Hauskatze_langhaar.jpg
width: 2288
height: 1712
lang: de
dir: ltr
revision: "243925950"
tid: 10010336-f713-11ee-b1a9-92580edda682
timestamp: "2024-04-10T08:19:34Z"
description: domestizierte Katze
description_source: central
content_urls:
desktop:
page: https://de.wikipedia.org/wiki/Hauskatze
revisions: https://de.wikipedia.org/wiki/Hauskatze?action=history
edit: https://de.wikipedia.org/wiki/Hauskatze?action=edit
talk: https://de.wikipedia.org/wiki/Diskussion:Hauskatze
mobile:
page: https://de.m.wikipedia.org/wiki/Hauskatze
revisions: https://de.m.wikipedia.org/wiki/Special:History/Hauskatze
edit: https://de.m.wikipedia.org/wiki/Hauskatze?action=edit
talk: https://de.m.wikipedia.org/wiki/Diskussion:Hauskatze
extract: >-
Die Hauskatze ist die Haustierform der Falbkatze. Sie zählt zu den
beliebtesten Heimtieren. In der Rassekatzenzucht werden oft nur die Tiere
als Hauskatze bezeichnet, die keiner anerkannten Katzenrasse angehören.
extract_html: >-
<p>Die <b>Hauskatze</b> ist die Haustierform der Falbkatze. Sie zählt zu den
beliebtesten Heimtieren. In der Rassekatzenzucht werden oft nur die Tiere
als Hauskatze bezeichnet, die keiner anerkannten Katzenrasse angehören.</p>
status: 200