AISE1_CLASS/Prompting Exercise/test_connection.py

24 lines
583 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
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.")