Models

Contains the EnergyDataPoint and EnergyGroupSummary classes, which represent the relevant data for a single agent call and the summarized data for multiple of these calls respectively.

class jamanota.models.EnergyDataPoint(*, input_token_count: int, output_token_count: int, estimated_energy_joule: float, estimated_co2e_kg: float, model_name: str, timestamp: datetime, message: str, prompt_id: str, agent_name: str)[source]

Measurement of estimated energy usage and environmental impact for a single model call.

input_token_count

Number of input tokens processed.

Type:

int

output_token_count

Number of output tokens generated.

Type:

int

estimated_energy_joule

Estimated energy usage in Joules.

Type:

float

estimated_co2e_kg

Estimated CO2 emissions in kilograms.

Type:

float

model_name

Name of the model used.

Type:

str

timestamp

Time when the datapoint was recorded.

Type:

datetime.datetime

message

Truncated model output message (first 100 chars).

Type:

str

prompt_id

Identifier linking agent calls stemming from the same original prompt.

Type:

str

agent_name

Name of the agent that generated the output.

Type:

str

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class jamanota.models.EnergyGroupSummary(*, name: str, total_energy_joule: float, total_co2e_kg: float, total_input_tokens: int, total_output_tokens: int, datapoint_count: int)[source]

Aggregated summary of energy and token usage for a group of datapoints.

name

Name of the group.

Type:

str

total_energy_joule

Total estimated energy usage in Joules

Type:

float

total_co2e_kg

Total estimated CO2 emissions in kilograms.

Type:

float

total_input_tokens

Total number of input tokens.

Type:

int

total_output_tokens

Total number of output tokens.

Type:

int

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].