Closed samuelrince closed 1 week ago
Support embedding Range values in f-strings. Currently, raises a TypeError exception.
Range
TypeError
TypeError: unsupported format string passed to Range.__format__
from ecologits import EcoLogits from openai import OpenAI EcoLogits.init() client = OpenAI(...) response = client.chat.completions.create(...) print(f"Energy consumption: {response.impacts.energy.value:.3f} kWh")
In addition, we could consider adding support for rounding Range values.
Description
Support embedding
Range
values in f-strings. Currently, raises aTypeError
exception.Example Code