mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-30 00:30:09 +00:00
* Fixes to setting StreamingChunk.index properly and refactoring tests for conversion * Make _convert_chat_completion_chunk_to_streaming_chunk a member of OpenAIChatGenerator so we can overwrite it in integrations that inherit from it * Fixes * Modify streaming chunk to accept a list of tool call deltas. * Fix tests * Fix mypy and update original reno * Undo change * Update conversion to return a single streaming chunk * update to print streaming chunk * Fix types * PR comments
9 lines
810 B
YAML
9 lines
810 B
YAML
---
|
|
features:
|
|
- |
|
|
Updated StreamingChunk to add the fields `tool_calls`, `tool_call_result`, `index`, and `start` to make it easier to format the stream in a streaming callback.
|
|
- Added new dataclass ToolCallDelta for the `StreamingChunk.tool_calls` field to reflect that the arguments can be a string delta.
|
|
- Updated `print_streaming_chunk` and `_convert_streaming_chunks_to_chat_message` utility methods to use these new fields. This especially improves the formatting when using `print_streaming_chunk` with Agent.
|
|
- Updated `OpenAIGenerator`, `OpenAIChatGenerator`, `HuggingFaceAPIGenerator`, `HuggingFaceAPIChatGenerator`, `HuggingFaceLocalGenerator` and `HuggingFaceLocalChatGenerator` to follow the new dataclasses.
|
|
- Updated `ToolInvoker` to follow the StreamingChunk dataclass.
|