Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 23, 2025
1 parent 95b2a8b commit 005caa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion comps/llms/src/doc-summarization/integrations/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ async def generate(self, input: DocSumChatCompletionRequest, client):

async def stream_generator():
import json

from langserve.serialization import WellKnownLCSerializer

_serializer = WellKnownLCSerializer()
Expand All @@ -200,7 +201,7 @@ async def stream_generator():
parsed_data = json.loads(chunk_data)

# Extract the 'value' items
data = [op['value'] for op in parsed_data['ops'] if 'value' in op]
data = [op["value"] for op in parsed_data["ops"] if "value" in op]
if isinstance(data, list) and len(data) > 1:
data = data[0]

Expand Down

0 comments on commit 005caa7

Please sign in to comment.