colorized think with ANSI to HTML
This commit is contained in:
parent
25005ad590
commit
6e3f8a89b4
5 changed files with 24 additions and 7 deletions
|
|
@ -66,9 +66,7 @@ def process_graph(data_graph: Dict[str, Any]):
|
|||
logger.debug("Saved langchain object to cache")
|
||||
return {
|
||||
"result": str(result),
|
||||
"thought": re.sub(
|
||||
r"\x1b\[([0-9,A-Z]{1,2}(;[0-9,A-Z]{1,2})?)?[m|K]", "", thought
|
||||
).strip(),
|
||||
"thought": thought.strip()
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue