Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
eyurtsev committed Nov 29, 2023
1 parent 4fb131f commit c3f67f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions langserve/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,6 @@ def __init__(
dictionary form. Note that only keys in `config_keys` will be
modifiable by this function.
"""
self.runnable = runnable

try:
from sse_starlette import EventSourceResponse
Expand Down Expand Up @@ -558,6 +557,8 @@ def __init__(
if with_types:
runnable = runnable.with_types(**with_types)

self.runnable = runnable

model_namespace = _replace_non_alphanumeric_with_underscores(path.strip("/"))

input_type_ = _resolve_model(
Expand Down Expand Up @@ -655,7 +656,7 @@ async def invoke(

event_aggregator = AsyncEventAggregatorCallback()
config["callbacks"] = [event_aggregator]
output = await self.runnable.ainvoke(input_, config)
output = await self.runnable.ainvoke(input_, config=config)

if self.include_callback_events:
callback_events = [
Expand Down

0 comments on commit c3f67f5

Please sign in to comment.