Questions about relationship analyses too
- The answer sees both charts and the comparison; both people see the questions - Heading, hint and example question per analysis kind Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -51,8 +51,9 @@ impl Analyzer {
|
||||
|
||||
async fn question_prompt(&self, job: &QuestionJob) -> Result<prompt::Prompt, LlmError> {
|
||||
let db_err = |e: sqlx::Error| LlmError::Transient(format!("database: {e}"));
|
||||
let (kind, chart_id, forecast_id, content): (String, Option<Uuid>, Option<Uuid>, Option<Value>) =
|
||||
sqlx::query_as("SELECT kind, chart_id, forecast_id, content FROM analyses WHERE id = $1")
|
||||
type Row = (String, Option<Uuid>, Option<Uuid>, Option<Uuid>, Option<Value>);
|
||||
let (kind, chart_id, synastry_id, forecast_id, content): Row =
|
||||
sqlx::query_as("SELECT kind, chart_id, synastry_id, forecast_id, content FROM analyses WHERE id = $1")
|
||||
.bind(job.analysis_id)
|
||||
.fetch_optional(&self.db)
|
||||
.await
|
||||
@@ -62,6 +63,7 @@ impl Analyzer {
|
||||
let content = content.ok_or_else(|| LlmError::Permanent("the analysis has no text".into()))?;
|
||||
let chart_text = match kind {
|
||||
Kind::Forecast => self.forecast_text(forecast_id).await?,
|
||||
Kind::Synastry => self.synastry_text(synastry_id).await?,
|
||||
_ => self.natal_text(chart_id).await?,
|
||||
};
|
||||
let analysis = prompt::to_markdown(kind, &job.language, &content);
|
||||
|
||||
Reference in New Issue
Block a user