Closed gavento closed 1 year ago
Would merge as is. Not sure if this should become part of core (interlab.text
) or contrib/experimental (but could be used in core agents and memories - should be non-intrusive if used at the highest level of formatting).
Add
FormatStr
class that acts as a string with format fields (like in Python f-string), but remembers the replaced parts and distinguishes them (colors them differently) in the context log.TODOs:
FormatStr
s?x.format(**locals())
FormatStr
for pythonic consistency?An example: