Update main.py
Browse files
main.py
CHANGED
|
@@ -118,7 +118,7 @@ async def health_check():
|
|
| 118 |
"""Health check endpoint"""
|
| 119 |
return {"status": "ok"}
|
| 120 |
|
| 121 |
-
@app.post("/v1/chat/completions")
|
| 122 |
async def chat_completions(
|
| 123 |
request: Request,
|
| 124 |
api_key: str = Depends(get_api_key)
|
|
@@ -315,7 +315,7 @@ async def chat_completions(
|
|
| 315 |
except Exception as e:
|
| 316 |
return {"error": str(e)}
|
| 317 |
|
| 318 |
-
@app.get("/v1/models")
|
| 319 |
async def list_models(api_key: str = Depends(get_api_key)):
|
| 320 |
try:
|
| 321 |
headers = {
|
|
|
|
| 118 |
"""Health check endpoint"""
|
| 119 |
return {"status": "ok"}
|
| 120 |
|
| 121 |
+
@app.post("/hf/v1/chat/completions")
|
| 122 |
async def chat_completions(
|
| 123 |
request: Request,
|
| 124 |
api_key: str = Depends(get_api_key)
|
|
|
|
| 315 |
except Exception as e:
|
| 316 |
return {"error": str(e)}
|
| 317 |
|
| 318 |
+
@app.get("/hf/v1/models")
|
| 319 |
async def list_models(api_key: str = Depends(get_api_key)):
|
| 320 |
try:
|
| 321 |
headers = {
|