Free chart summaries; password login off by default
- New analysis kind 'summary' (migration 0005): saving a chart queues a
free 3-4 sentence summary written by SUMMARY_MODEL (default Sonnet
5.5, about 1 cent; Haiku was tested too but chose weaker highlights).
POST /v1/charts/{id}/summary returns it and re-queues a failed one.
- The chart page shows it in a "Röviden" card and polls until ready.
- PASSWORD_LOGIN (default false): register, login and password reset
answer 403; only Google (later Apple, Facebook) logins remain.
- Prompt v2: Hungarian names for elements and modalities (an English
"Fire" slipped into a summary); worker compare-models --summary.
- The worker also reads a lower-case openrouter_api_key.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
//! ```
|
||||
//!
|
||||
//! `--chart` is a horoscope-api `/v1/natal` response; `--synastry FILE` (instead
|
||||
//! of `--chart`) takes a `/v1/synastry` response for a relationship analysis. The models get shuffled
|
||||
//! of `--chart`) takes a `/v1/synastry` response for a relationship analysis;
|
||||
//! `--summary` with `--chart` writes the short free summary instead. The models get shuffled
|
||||
//! letters: `A.md`, `B.md`, ... hold the analyses, `key.json` tells which
|
||||
//! letter is which model (with tokens, cost and time). The output on the
|
||||
//! console does not reveal the mapping.
|
||||
@@ -31,14 +32,15 @@ struct Args {
|
||||
}
|
||||
|
||||
fn parse(args: Vec<String>) -> anyhow::Result<Args> {
|
||||
let (mut chart, mut synastry, mut models, mut language, mut out) =
|
||||
(None, None, Vec::new(), "hu".to_owned(), None);
|
||||
let (mut chart, mut synastry, mut models, mut language, mut out) = (None, None, Vec::new(), "hu".to_owned(), None);
|
||||
let mut summary = false;
|
||||
let mut it = args.into_iter();
|
||||
while let Some(flag) = it.next() {
|
||||
let mut value = || it.next().with_context(|| format!("{flag} needs a value"));
|
||||
match flag.as_str() {
|
||||
"--chart" => chart = Some(PathBuf::from(value()?)),
|
||||
"--synastry" => synastry = Some(PathBuf::from(value()?)),
|
||||
"--summary" => summary = true,
|
||||
"--models" => models = value()?.split(',').map(|m| m.trim().to_owned()).filter(|m| !m.is_empty()).collect(),
|
||||
"--language" => language = value()?,
|
||||
"--out" => out = Some(PathBuf::from(value()?)),
|
||||
@@ -46,6 +48,7 @@ fn parse(args: Vec<String>) -> anyhow::Result<Args> {
|
||||
}
|
||||
}
|
||||
let (input, kind) = match (chart, synastry) {
|
||||
(Some(c), None) if summary => (c, prompt::Kind::Summary),
|
||||
(Some(c), None) => (c, prompt::Kind::Natal),
|
||||
(None, Some(s)) => (s, prompt::Kind::Synastry),
|
||||
_ => bail!("give either --chart or --synastry"),
|
||||
|
||||
Reference in New Issue
Block a user