Skip to content

Commit 494d831

Browse files
authored
fix: fixed invocation path in fastapi (#165)
1 parent 1db216e commit 494d831

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pipeline/framework/fast_api/fast_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def health():
7272
return "200 OK"
7373

7474
# As sagemaker endpoint requires...
75+
@app.post("/invocations")
7576
@app.post("/v1/invocations")
7677
@app.post("/v1/chat/completions")
7778
@app.post("/v1/embeddings")
@@ -98,6 +99,7 @@ async def invocations(request: Request, authorization: str = Depends(get_authori
9899
"health": {"func": health, "methods": ["GET"]},
99100
# Note: The functions for the POST endpoints all use "invocations".
100101
"invocations": {"func": invocations, "methods": ["POST"]},
102+
"v1/invocations": {"func": invocations, "methods": ["POST"]},
101103
"v1/chat/completions": {"func": invocations, "methods": ["POST"]},
102104
"v1/embeddings": {"func": invocations, "methods": ["POST"]},
103105
"score": {"func": invocations, "methods": ["POST"]},

0 commit comments

Comments
 (0)