Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -57,11 +57,11 @@ async def get_models():
|
|
57 |
except httpx.RequestError as e:
|
58 |
raise HTTPException(status_code=500, detail=f"Request failed: {e}")
|
59 |
|
60 |
-
@app.get("/
|
61 |
async def fetch_models():
|
62 |
return await get_models()
|
63 |
|
64 |
-
@app.post("/
|
65 |
async def get_completion(payload: Payload, request: Request):
|
66 |
api_key = request.headers.get("Authorization")
|
67 |
|
|
|
57 |
except httpx.RequestError as e:
|
58 |
raise HTTPException(status_code=500, detail=f"Request failed: {e}")
|
59 |
|
60 |
+
@app.get("/models")
|
61 |
async def fetch_models():
|
62 |
return await get_models()
|
63 |
|
64 |
+
@app.post("/chat/completions")
|
65 |
async def get_completion(payload: Payload, request: Request):
|
66 |
api_key = request.headers.get("Authorization")
|
67 |
|