Skip to content

Commit

Permalink
Fix ask json resp handling (#2264)
Browse files Browse the repository at this point in the history
  • Loading branch information
lferran authored Jun 20, 2024
1 parent b3714cc commit 034ce7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nucliadb/src/nucliadb/search/search/chat/ask.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ async def _stream_predict_answer_text(self) -> AsyncGenerator[str, None]:
self.metrics.record_first_chunk_yielded()
first_answer_chunk_yielded = True
yield item.text
if isinstance(item, JSONGenerativeResponse):
elif isinstance(item, JSONGenerativeResponse):
self._object = item
elif isinstance(item, StatusGenerativeResponse):
self._status = item
Expand Down

2 comments on commit 034ce7f

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 034ce7f Previous: 0d03d9f Ratio
tests/search/unit/search/test_fetch.py::test_highligh_error 2301.2574247756247 iter/sec (stddev: 0.0000028400975602468654) 2841.0684406726436 iter/sec (stddev: 0.000004954958228416619) 1.23

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 034ce7f Previous: 0d03d9f Ratio
tests/search/unit/search/test_fetch.py::test_highligh_error 2291.2186804804287 iter/sec (stddev: 0.000003375370111525578) 2841.0684406726436 iter/sec (stddev: 0.000004954958228416619) 1.24

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.