Skip to content

Commit e0e2ebd

Browse files
committed
Relax upper-bound for sse-starlette
1 parent d20eab4 commit e0e2ebd

File tree

4 files changed

+2244
-1668
lines changed

4 files changed

+2244
-1668
lines changed

langserve/server.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@
2929
from langserve.serialization import Serializer
3030

3131
try:
32-
from fastapi import APIRouter, Depends, FastAPI, Request, Response
32+
from fastapi import APIRouter, Depends, FastAPI, Request, Response, Body
3333
except ImportError:
3434
# [server] extra not installed
3535
APIRouter = Depends = FastAPI = Request = Response = Any
36+
Body = object
3637

3738
# A function that that takes a config and a raw request
3839
# and updates the config based on the request.
@@ -795,7 +796,7 @@ async def _invoke_docs(
795796
if endpoint_configuration.is_batch_enabled:
796797

797798
async def _batch_docs(
798-
batch_request: Annotated[BatchRequest, BatchRequest],
799+
batch_request: Annotated[BatchRequest, Body()],
799800
config_hash: str = "",
800801
) -> BatchResponse:
801802
"""Batch invoke the runnable with the given inputs and config."""

0 commit comments

Comments
 (0)