Skip to content

Commit 77c8235

Browse files
fix: correct InvestmentThesis field refs in translator + question_generator
- translator_agent.py: thesis.lang → thesis.working_language, thesis.conviction → thesis.confidence_score - question_generator.py: same confidence_score fix in log line - Full AAPL pipeline verified: analyze → translate → IPFS pin ✅ Co-Authored-By: AdaL <adal@sylph.ai>
1 parent d0bf48f commit 77c8235

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

agents/translator_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def translate(self, thesis: InvestmentThesis) -> PredictionMarketQuestion | None
110110
"summary_en": thesis.thesis_summary_en[:800],
111111
"risks": risks[:400],
112112
"thesis_id": thesis.thesis_id,
113-
"lang": thesis.working_language,
113+
"lang": thesis.working_language or "en",
114114
"model_name": self._model_name,
115115
}
116116
)
@@ -119,7 +119,7 @@ def translate(self, thesis: InvestmentThesis) -> PredictionMarketQuestion | None
119119
output,
120120
extra_fields={
121121
"source_thesis_id": thesis.thesis_id,
122-
"source_language": thesis.lang,
122+
"source_language": thesis.working_language or "en",
123123
"translated_by_model": self._model_name,
124124
},
125125
)

markets/question_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ async def generate(
6262
agent = _build_agent(region)
6363
logger.info("Running %s agent on %s…", region.upper(), ticker)
6464
thesis = await agent.analyze(ticker)
65-
logger.info("Thesis: %s %s (conviction=%.2f)", ticker, thesis.direction.value, thesis.conviction)
65+
logger.info("Thesis: %s %s (confidence=%.2f)", ticker, thesis.direction.value, thesis.confidence_score)
6666

6767
# 2. Translate to prediction-market question
6868
translator = TranslatorAgent()

0 commit comments

Comments
 (0)