Skip to content

Commit

Permalink
patch: fix feedback in astream log and astream events (#620)
Browse files Browse the repository at this point in the history
Code was checking if feedback was enabled rather than token feedback.
  • Loading branch information
eyurtsev authored Apr 25, 2024
1 parent 109445b commit 153616b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions langserve/api_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ async def _stream_log() -> AsyncIterator[dict]:
}

# Send a metadata event as soon as possible
if not has_sent_metadata and self._enable_feedback_endpoint:
if not has_sent_metadata and self._token_feedback_enabled:
if task is None:
raise AssertionError("Feedback token task was not created.")
if not task.done():
Expand Down Expand Up @@ -1354,7 +1354,7 @@ async def _stream_events() -> AsyncIterator[dict]:
}

# Send a metadata event as soon as possible
if not has_sent_metadata and self._enable_feedback_endpoint:
if not has_sent_metadata and self._token_feedback_enabled:
if task is None:
raise AssertionError("Feedback token task was not created.")
if not task.done():
Expand Down

0 comments on commit 153616b

Please sign in to comment.