Skip to content

help:docker部署启用工具调用,没有内容输出 #67

Description

@justincnn

docker compose部署,打开这个,lobehub和cherry无法对话,关闭则可以,

Image
 curl 'https://********/v1/chat/completions' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer *’************************* \
  -d '{
    "model": "glm-5",
    "stream": true,
    "messages": [
      {"role": "user", "content": "请搜索一下今天的天气"}
    ],
    "tools": [
      {
        "type": "function",
        "function": {
          "name": "search_weather",
          "description": "搜索指定城市的天气",
          "parameters": {
            "type": "object",
            "properties": {
              "city": {"type": "string"}
            },
            "required": ["city"]
          }
        }
      }
    ]
  }'
data: {"id":"da91bf73-4341-4db5-bb56-cf37d687e965","choices":[{"index":0,"delta":{"role":"assistant"},"finish_reason":null,"logprobs":null}],"object":"chat.completion.chunk","created":1773569901,"model":"glm-5","usage":null,"system_fingerprint":"fp_api_proxy_001"}

data: {"id":"da91bf73-4341-4db5-bb56-cf37d687e965","choices":[{"index":0,"delta":{},"finish_reason":"stop","logprobs":null}],"object":"chat.completion.chunk","created":1773569901,"model":"glm-5","usage":{"prompt_tokens":0,"completion_tokens":0,"total_tokens":0,"prompt_tokens_details":{"audio_tokens":0,"cached_tokens":0},"completion_tokens_details":{"audio_tokens":0,"reasoning_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"system_fingerprint":"fp_api_proxy_001"}

data: [DONE]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions