Skip to content

tdfs4ds.impact_agent.llm

tdfs4ds.impact_agent.llm

The impact agent's model: the consumer's instruct model, or another model of the same provider.

tdfs4ds.IMPACT_AGENT_MODEL (env TDFS4DS_IMPACT_AGENT_MODEL) names a model on the SAME provider, URL, key and region as INSTRUCT_MODEL_*; blank = INSTRUCT_MODEL_MODEL. The model name is overridden for this call only: no module global is changed.

impact_model_name

impact_model_name() -> Optional[str]

The model name the impact agent uses (None when no instruct model is set).

model_available

model_available() -> Tuple[bool, Optional[str]]

(True, None) when a model can be built, else (False, reason). No call is made.

build_impact_llm

build_impact_llm(temperature: float = 0.0)

A chat client for the impact agent: :func:tdfs4ds.genai.documentation.build_llm with the model name overridden for this call only. Raises RuntimeError when no model is configured.