ping.sh 692 Bytes
Newer Older
Yan Ru Pei's avatar
Yan Ru Pei committed
1
2
#!/bin/bash

3
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Yan Ru Pei's avatar
Yan Ru Pei committed
4
5
# SPDX-License-Identifier: Apache-2.0

Yan Ru Pei's avatar
Yan Ru Pei committed
6
7
# Get port from first argument, default to 8000 if not provided
PORT=${1:-8000}
Yan Ru Pei's avatar
Yan Ru Pei committed
8
9
10
11
12
13
14
15
16
17
18

curl -X POST http://localhost:${PORT}/v1/chat/completions \
    -H "Content-Type: application/json" \
    -H "Accept: text/event-stream" \
    -d '{
    "model": "deepseek-ai/DeepSeek-R1-Distill-Llama-8B",
    "messages": [
        {"role": "system", "content": "You are a helpful assistant. Answer in 5 words."},
        {"role": "user", "content": "What is 2+2?"}
    ],
    "stream": true,
19
    "max_completion_tokens": 10,
Yan Ru Pei's avatar
Yan Ru Pei committed
20
21
    "ignore_eos": true
    }'