Skip to content

docs: Bugs in the provided example of Data Classes - StreamingChunk #10044

@TaMaN2031A

Description

@TaMaN2031A

Describe the bug
There is a missing import in the code snippet of this example: ToolCallDelta. There is also a missing required argument in the StreamingChunk, which is content. There is an unnecessary ComponentInfo import.

Error message
NameError: name 'ToolCallDelta' is not defined
and
TypeError: StreamingChunk.__init__() missing 1 required positional argument: 'content'

Expected behavior
The code should run successfully.

To Reproduce
Run the code directly, and it will produce the first error. To produce the second, write the needed import.

FAQ Check

System:

  • OS: WSL-Ubuntu on Windows 11
  • GPU/CPU: Not important
  • Haystack version (commit or version number): 2.19.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High priority, add to the next sprinttype:documentationImprovements on the docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions