MCPcopy Create free account
hub / github.com/OpenBMB/ToolBench / wrap_text

Method wrap_text

toolbench/tooleval/evaluation/dataclass.py:123–130  ·  view source on GitHub ↗
(text:str, width=20)

Source from the content-addressed store, hash-verified

121 'shape':'box'}
122 }
123 def wrap_text(text:str, width=20):
124 wrapped_text = ''
125 for i in range(0, min(width*5,len(text)), width):
126 wrapped_text += text[i:i+width] + '\n'
127 escaped_chars = re.findall(r'\\[nrt\'"\\]', wrapped_text)
128 for escaped_char in escaped_chars:
129 wrapped_text = wrapped_text.replace(escaped_char, '')
130 return wrapped_text
131
132 def set_node_vis(gnode,node:ExecutionNode):
133 for k,v in VIS_CONFIG[node.role].items():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected