MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / clean

Function clean

eval_heldout/science-world/eval.py:31–35  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

29CONTROLLER_ADDR = os.environ.get('CONTROLLER_ADDR', '').split(',')
30
31def clean(s):
32 clean_toks = ['\n', '\t']
33 for tok in clean_toks:
34 s = s.replace(tok, ' ')
35 return s
36
37def num_tokens_from_messages(messages, model="gpt-3.5-turbo-0613"):
38 """Return the number of tokens used by a list of messages."""

Callers 2

evalFunction · 0.70
__call__Method · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected