feat: initial release of q38max gateway
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
PORT=${1:-18080}
|
||||
BASE_URL="http://localhost:${PORT}"
|
||||
|
||||
echo "=== 1. Testing Models Endpoint ==="
|
||||
curl -s "${BASE_URL}/v1/models" | jq .
|
||||
|
||||
echo ""
|
||||
echo "=== 2. Testing Non-Streaming Chat Completion ==="
|
||||
curl -s -X POST "${BASE_URL}/v1/chat/completions" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "qwen-3.8-max",
|
||||
"messages": [
|
||||
{"role": "user", "content": "What is the capital of Italy? Answer in 1 word."}
|
||||
],
|
||||
"reasoning_effort": "none",
|
||||
"max_tokens": 50
|
||||
}' | jq .
|
||||
|
||||
echo ""
|
||||
echo "=== 3. Testing Streaming SSE Completion (with reasoning) ==="
|
||||
curl -N -s -X POST "${BASE_URL}/v1/chat/completions" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "qwen-3.8-max",
|
||||
"messages": [
|
||||
{"role": "user", "content": "Calculate 25 * 25 and explain briefly in one sentence."}
|
||||
],
|
||||
"stream": true,
|
||||
"reasoning_effort": "medium",
|
||||
"max_tokens": 150
|
||||
}'
|
||||
|
||||
echo ""
|
||||
echo "=== 4. Testing Function/Tool Calling ==="
|
||||
curl -s -X POST "${BASE_URL}/v1/chat/completions" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "qwen-3.8-max",
|
||||
"messages": [
|
||||
{"role": "user", "content": "What is the weather in Berlin?"}
|
||||
],
|
||||
"tools": [
|
||||
{
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "get_weather",
|
||||
"description": "Get current weather for location",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"location": {"type": "string"}
|
||||
},
|
||||
"required": ["location"]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"reasoning_effort": "none",
|
||||
"max_tokens": 200
|
||||
}' | jq .
|
||||
|
||||
echo ""
|
||||
echo "=== All integration tests finished successfully! ==="
|
||||
Reference in New Issue
Block a user