Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
lilydu committed Nov 25, 2024
1 parent 76c0aa2 commit d05db1e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions python/packages/ai/teams/streaming/streaming_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def queue_informative_update(self, text: str) -> None:
self._next_sequence += 1

def queue_text_chunk(self, text: str, citations: Optional[List[Citation]] = None) -> None:
# pylint: disable=unused-argument
"""
Queues a chunk of partial message text to be sent to the client.
The text we be sent as quickly as possible to the client. Chunks may be combined before
Expand All @@ -159,7 +160,7 @@ def queue_text_chunk(self, text: str, citations: Optional[List[Citation]] = None
raise ApplicationError("The stream has already ended.")

self._message += text

# If there are citations, modify the content so that the sources are numbers
# instead of [doc1], [doc2], etc.
self._message = format_citations_response(self._message)
Expand Down Expand Up @@ -282,12 +283,12 @@ async def send_activity(self, activity: Activity) -> None:
]

# If there are citations, filter out the citations unused in content.
if self._citations and len(self._citations) > 0 and self._ended == False:
currCitations = get_used_citations(self._message, self._citations)
if self._citations and len(self._citations) > 0 and self._ended is False:
curr_citations = get_used_citations(self._message, self._citations)
activity.entities.append(
AIEntity(
additional_type=[],
citation=currCitations if currCitations else [],
citation=curr_citations if curr_citations else [],
)
)

Expand Down

0 comments on commit d05db1e

Please sign in to comment.