Skip to content

Commit 37eebd2

Browse files
authored
fix: update type hints for decode_request and encode_response methods (#651)
1 parent d244f2c commit 37eebd2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/litserve/specs/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
from abc import abstractmethod
1515
from collections.abc import AsyncGenerator, Callable, Generator
16-
from typing import TYPE_CHECKING, Optional, Union
16+
from typing import TYPE_CHECKING, Any, Optional, Union
1717

1818
if TYPE_CHECKING:
1919
from litserve import LitAPI, LitServer
@@ -59,12 +59,12 @@ def endpoints(self):
5959
return self._endpoints.copy()
6060

6161
@abstractmethod
62-
def decode_request(self, request, meta_kwargs):
62+
def decode_request(self, request, context_kwargs) -> Any:
6363
"""Convert the request payload to your model input."""
6464
pass
6565

6666
@abstractmethod
67-
def encode_response(self, output, meta_kwargs):
67+
def encode_response(self, output, context_kwargs) -> Any:
6868
"""Convert the model output to a response payload.
6969
7070
To enable streaming, it should yield the output.

0 commit comments

Comments
 (0)