MCPcopy Create free account
hub / github.com/DVampire/FinAgent / content_replace

Function content_replace

finagent/prompt/helper.py:44–56  ·  view source on GitHub ↗
(content: str)

Source from the content-addressed store, hash-verified

42
43
44def content_replace(content: str):
45 maps = {
46 "&lt;": "<",
47 "&gt;": ">",
48 "&amp;": "&",
49 "&#10;": "\n",
50 "&#13;": "\r",
51 "&#9;": "\t",
52 "&nbsp;": " ",
53 }
54 for key in maps.keys():
55 content = content.replace(key, maps[key])
56 return content
57
58def generate_prompt_html(params: Dict[str, Any], template: str):
59 template = str2html(template)

Callers 1

to_messageMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected