feat(config): expose sampling temperature and document reproducibility
Adds a cross-provider temperature config (and TRADINGAGENTS_TEMPERATURE), forwarded to every LLM client when set, so runs can be made less variable on models that honor it. Adds a README "Reproducibility" section that separates the sources of run-to-run variation, what users can control (temperature, non-reasoning model, pinned date), and what is inherent to LLM-driven analysis, and notes that the identity and verified-data fixes already removed the "different companies / fabricated prices" variance. #178 #168
This commit is contained in:
9 files changed
+123
-4
No files matched your search
@@ -155,6 +155,13 @@ class TradingAgentsGraph:
|
||||
if effort:
|
||||
kwargs["effort"] = effort
|
||||
|
||||
# Sampling temperature is cross-provider: forward it whenever set.
|
||||
# float() here so a value coming from a TRADINGAGENTS_TEMPERATURE env
|
||||
# string ("0.2") works the same as a programmatic float.
|
||||
temperature = self.config.get("temperature")
|
||||
if temperature is not None and temperature != "":
|
||||
kwargs["temperature"] = float(temperature)
|
||||
|
||||
return kwargs
|
||||
|
||||
def _create_tool_nodes(self) -> Dict[str, ToolNode]:
|
||||
|
||||
Reference in new issue
Block a user