mirror of
https://github.com/kmein/niveum
synced 2026-03-22 12:51:08 +01:00
Compare commits
2 Commits
44cb0bf8a5
...
4af218f7ad
| Author | SHA1 | Date | |
|---|---|---|---|
| 4af218f7ad | |||
| b08576c972 |
@@ -20,7 +20,7 @@ in {
|
|||||||
serviceConfig.LoadCredential = [
|
serviceConfig.LoadCredential = [
|
||||||
"gemini-api-key:${config.age.secrets.gemini-api-key.path}"
|
"gemini-api-key:${config.age.secrets.gemini-api-key.path}"
|
||||||
];
|
];
|
||||||
startAt = "hourly";
|
startAt = "*:50";
|
||||||
script = ''
|
script = ''
|
||||||
set -efu
|
set -efu
|
||||||
PATH=$PATH:${lib.makeBinPath [pkgs.w3m pkgs.gnused pkgs.curl pkgs.jq]}
|
PATH=$PATH:${lib.makeBinPath [pkgs.w3m pkgs.gnused pkgs.curl pkgs.jq]}
|
||||||
@@ -36,7 +36,7 @@ in {
|
|||||||
Summarize the following news headlines into a cohesive, engaging script under 400 words.
|
Summarize the following news headlines into a cohesive, engaging script under 400 words.
|
||||||
Keep it professional, concise, and easy to follow.
|
Keep it professional, concise, and easy to follow.
|
||||||
|
|
||||||
Begin the digest with: "Good news everybody! Here's your news update for $(date -u +"%B %d, %Y")..."
|
Begin the digest with: "Here's your news update for $(date -u +"%B %d, %Y")."
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ in {
|
|||||||
|
|
||||||
RESPONSE=$(echo "$REQUEST" | curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-8b:generateContent?key=$GEMINI_API_KEY" -s -H "Content-Type: application/json" -d @-)
|
RESPONSE=$(echo "$REQUEST" | curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-8b:generateContent?key=$GEMINI_API_KEY" -s -H "Content-Type: application/json" -d @-)
|
||||||
|
|
||||||
echo "$RESPONSE" | jq --arg from "$(date -u -Is | sed 's/+00:00/Z/')" --arg to "$(date -u -Is -d 'next hour' | sed 's/+00:00/Z/')" '
|
echo "$RESPONSE" | jq --arg from "$(date -u -Is | sed 's/+00:00/Z/')" --arg to "$(date -u -Is -d 'now + 30 minutes' | sed 's/+00:00/Z/')" '
|
||||||
{
|
{
|
||||||
from: $from,
|
from: $from,
|
||||||
to: $to,
|
to: $to,
|
||||||
|
|||||||
Reference in New Issue
Block a user