reaktor2: use new bing api

This commit is contained in:
lassulus 2023-06-10 22:38:40 +02:00
parent f227bcea9e
commit ab0812fa5a

View File

@ -77,7 +77,7 @@ let
if [ "$?" -ne 0 ]; then if [ "$?" -ne 0 ]; then
report_error "$response" report_error "$response"
else else
if ! text=$(printf '%s' "$response" | jq -er '.item.messages[1].text'); then if ! text=$(printf '%s' "$response" | jq -er '.item.messages[-1].text'); then
echo "$_from: $(report_error "$response")" echo "$_from: $(report_error "$response")"
exit 0 exit 0
fi fi
@ -85,7 +85,7 @@ let
echo "$_from: $text" | fold -s -w 426 echo "$_from: $text" | fold -s -w 426
printf '%s' "$response" | printf '%s' "$response" |
jq -r '[.item.messages[1].sourceAttributions[].seeMoreUrl] | to_entries[] | "[\(.key + 1)]: \(.value)"' jq -r '[.item.messages[-1].sourceAttributions[].seeMoreUrl] | to_entries[] | "[\(.key + 1)]: \(.value)"'
fi fi
''; '';
}; };
@ -158,6 +158,7 @@ let
''; '';
}; };
}; };
interrogate = { interrogate = {
pattern = "^!interrogate (.*)$"; pattern = "^!interrogate (.*)$";
activate = "match"; activate = "match";