MCPcopy Create free account
hub / github.com/ChenWu98/agent-attack / remove_caption

Function remove_caption

agent_attack/data/clean_data.py:15–17  ·  view source on GitHub ↗
(obs_text: str)

Source from the content-addressed store, hash-verified

13
14
15def remove_caption(obs_text: str) -> str:
16 # Convert each "description: <caption (may contain ",")>, url: <url (may contain ])>]" to "url: <url (may contain ])>]"
17 return re.sub(r"description: (.*?), url: (.*?)]", r"url: \2]", obs_text)
18
19
20def get_examples(traj_root):

Callers 2

get_examplesFunction · 0.90
get_examplesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected