Admin: the yearly forecast prompt is editable and can be tried on own forecasts
CI / test (push) Successful in 59s
CI / build (push) Successful in 5m29s
CI / deploy (push) Skipped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-18 11:10:40 +00:00
co-authored by Claude Opus 5.5
parent f1bd34c394
commit b0e35433ac
7 changed files with 168 additions and 32 deletions
+4 -2
View File
@@ -48,6 +48,7 @@ pub struct PreviewJob {
pub kind: String,
pub chart_id: Option<Uuid>,
pub synastry_id: Option<Uuid>,
pub forecast_id: Option<Uuid>,
pub language: String,
pub model: String,
pub system: String,
@@ -159,7 +160,7 @@ impl Analyzer {
"UPDATE prompt_previews SET status = 'running', started_at = now() \
WHERE id = (SELECT id FROM prompt_previews WHERE status = 'pending' \
ORDER BY created_at LIMIT 1 FOR UPDATE SKIP LOCKED) \
RETURNING id, kind, chart_id, synastry_id, language, model, system",
RETURNING id, kind, chart_id, synastry_id, forecast_id, language, model, system",
)
.fetch_optional(&self.db)
.await?;
@@ -177,7 +178,8 @@ impl Analyzer {
Kind::parse(&job.kind).ok_or_else(|| LlmError::Permanent(format!("unknown kind '{}'", job.kind)))?;
let text = match kind {
Kind::Synastry => self.synastry_text(job.synastry_id).await?,
_ => self.natal_text(job.chart_id).await?,
Kind::Forecast => self.forecast_text(job.forecast_id).await?,
Kind::Natal | Kind::Summary => self.natal_text(job.chart_id).await?,
};
let built = prompt::build(kind, &job.language, &text, Some(&job.system));
let mut c = self.llm.complete(&job.model, &built).await?;