24 lines
583 B
Python
24 lines
583 B
Python
"""
|
||
test_connection.py – Verify the vLLM server connection
|
||
=========================================================
|
||
Run this script from the prompting_exercises/ directory before starting
|
||
the exercises:
|
||
|
||
python test_connection.py
|
||
|
||
Expected output:
|
||
Models available: ['qwen3.5-35b-a3b']
|
||
Connection OK.
|
||
"""
|
||
|
||
from server_utils import get_client, list_models
|
||
|
||
client = get_client()
|
||
models = list_models(client)
|
||
print(f"Models available: {models}")
|
||
|
||
if models:
|
||
print("Connection OK.")
|
||
else:
|
||
print("WARNING: no models returned – check server address and port.")
|