mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-21 14:05:17 +02:00
To avoid JSONDecodeError:
Remove comments in output json str, after json value content, maybe start with #, maybe start with //, particularly, it is not inside the string value Addtionly, if you do not want JSONDecodeError to occur, you can add 'Delete comments in json' after FORMAT_CONSTRAINT in action_node.py
This commit is contained in:
parent
59afc5301f
commit
ed54f6b86a
2 changed files with 29 additions and 4 deletions
|
|
@ -24,6 +24,8 @@ TAG = "CONTENT"
|
|||
|
||||
LANGUAGE_CONSTRAINT = "Language: Please use the same language as Human INPUT."
|
||||
FORMAT_CONSTRAINT = f"Format: output wrapped inside [{TAG}][/{TAG}] like format example, nothing else."
|
||||
# Delete comments in json
|
||||
# If you don't want JSONDecodeError to occur, you can add Delete comments in json after FORMAT_CONSTRAINT
|
||||
|
||||
|
||||
SIMPLE_TEMPLATE = """
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue