Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /AmberLee2427_nancy-brain /tests /test_server.py
| #!/usr/bin/env python3 | |
| """ | |
| Quick manual test to start the HTTP API server. | |
| Run this to test the server manually. | |
| """ | |
| import sys | |
| from pathlib import Path | |
| # Add the nancy-brain directory to Python path | |
| sys.path.insert(0, str(Path(__file__).parent)) | |
| from connectors.http_api.app import app | |
| if __name__ == "__main__": | |
| print("๐ Starting Nancy RAG HTTP API...") | |
| print("๐ Note: RAG service not initialized - expect 503 errors for most endpoints") | |
| print("โ OpenAPI docs available at: http://localhost:8000/docs") | |
| print("โ OpenAPI JSON at: http://localhost:8000/openapi.json") | |
| print() | |
| try: | |
| import uvicorn | |
| uvicorn.run(app, host="127.0.0.1", port=8000, log_level="info") | |
| except ImportError: | |
| print("โ uvicorn not available. Install with: pip install uvicorn") | |
| print("๐ Alternatively, use: python -m uvicorn connectors.http_api.app:app --host 127.0.0.1 --port 8000") | |
| except KeyboardInterrupt: | |
| print("\n๐ Server stopped") | |
Xet Storage Details
- Size:
- 1 kB
- Xet hash:
- 4571f50835b5cc14a13c888f087f811687844251d9b0590a1b2ef1142f18d848
ยท
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.