Former-commit-id: c9e424d2198b5872ce118a6ab4c109bf73be2bee
This commit is contained in:
hiyouga
2024-06-25 02:55:50 +08:00
parent cd899734f3
commit 98f382fda3
2 changed files with 2 additions and 7 deletions

View File

@@ -113,9 +113,7 @@ def test_glm4_tool_formatter():
assert formatter.apply(content=json.dumps(tools)) == [
"你是一个名为 ChatGLM 的人工智能助手。你是基于智谱AI训练的语言模型 GLM-4 模型开发的,"
"你的任务是针对用户的问题和要求提供适当的答复和支持。# 可用工具\n\n"
"## test_tool\n\n{}\n在调用上述函数时,请使用 Json 格式表示调用的参数。".format(
json.dumps(tools[0], indent=4)
)
"## test_tool\n\n{}\n在调用上述函数时,请使用 Json 格式表示调用的参数。".format(json.dumps(tools[0], indent=4))
]