MetaGLM/glm-cookbook

glm-4-flash stop 参数

UbeCc opened this issue · 0 comments

System Info / 系統信息

https://open.bigmodel.cn/api/paas/v4/chat/completions

Information / 问题信息

  • The official example scripts / 仓库中的示例脚本
  • My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

image

curl "https://open.bigmodel.cn/api/paas/v4/chat/completions" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $ZHIPU_API_KEY" \
    -d '{
        "stream": false,
        "model": "glm-4-flash",
        "max_tokens": 1024,
        "stop": ["\n\n"],
        "messages": [
            {
                "role": "user",
                "content": "The operation $\\otimes$ is defined for all nonzero numbers by $a\\otimes b =\\frac{a^{2}}{b}$. Determine $[(1\\otimes 2)\\otimes 3]-[1\\otimes (2\\otimes 3)]$.\n$\\text{(A)}\\ -\\frac{2}{3}\\qquad\\text{(B)}\\ -\\frac{1}{4}\\qquad\\text{(C)}\\ 0\\qquad\\text{(D)}\\ \\frac{1}{4}\\qquad\\text{(E)}\\ \\frac{2}{3}$"
            }
        ]
    }'

Expected behavior / 期待表现

在第一步推理后终止