Files
railseek6/check_config_simple.py
2026-01-13 09:51:35 +08:00

32 lines
1.5 KiB
Python
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.

import requests
import json
print("Checking server configuration...")
try:
response = requests.get("http://localhost:3015/config", headers={"X-API-Key": "jleu1212"})
if response.status_code == 200:
config = response.json()
print(f"Server configuration:")
print(f" rerank_binding: {config.get('rerank_binding', 'NOT FOUND')}")
print(f" rerank_model: {config.get('rerank_model', 'NOT FOUND')}")
print(f" enable_rerank: {config.get('enable_rerank', 'NOT FOUND')}")
# Check if server was restarted with our changes
if config.get('rerank_binding') == 'jina':
print("\n✅ Server IS configured for Jina rerank!")
print(" This means the server was restarted with our configuration changes.")
elif config.get('rerank_binding') == 'null':
print("\n❌ Server is NOT configured for rerank (binding=null)")
print(" The server needs to be restarted with: --rerank-binding jina")
else:
print(f"\n Unknown rerank binding: {config.get('rerank_binding')}")
else:
print(f"Error: Status code {response.status_code}")
print(response.text)
except Exception as e:
print(f"Error: {e}")
print("\n" + "="*60)
print("Checking if server is running with modified start_server.py...")
print("The server needs to be restarted after configuration changes.")
print("If rerank_binding is still 'null', the server hasn't been restarted.")