mirror of
https://github.com/kmein/niveum
synced 2026-03-18 11:01:07 +01:00
Compare commits
2 Commits
44cb0bf8a5
...
4af218f7ad
| Author | SHA1 | Date | |
|---|---|---|---|
| 4af218f7ad | |||
| b08576c972 |
@@ -20,7 +20,7 @@ in {
|
||||
serviceConfig.LoadCredential = [
|
||||
"gemini-api-key:${config.age.secrets.gemini-api-key.path}"
|
||||
];
|
||||
startAt = "hourly";
|
||||
startAt = "*:50";
|
||||
script = ''
|
||||
set -efu
|
||||
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.
|
||||
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
|
||||
)
|
||||
|
||||
@@ -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 @-)
|
||||
|
||||
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,
|
||||
to: $to,
|
||||
|
||||
Reference in New Issue
Block a user