fix(huggingface): pass prompt as tuple to Thread args instead of a set by frankgoldfish · Pull Request #13677 · microsoft/semantic-kernel
In `HuggingFaceTextCompletion._inner_get_streaming_text_contents`, the
`Thread` constructor was called with `args={prompt}`, which creates a Python
**set** `{prompt}` rather than the required positional-arguments **tuple**
`(prompt,)`.
`threading.Thread` requires `args` to be a sequence (tuple or list) that is
unpacked as positional arguments to the `target` callable. Passing a set
causes undefined iteration order and, for a single-element set containing a
string, the string would be iterated character by character instead of being
passed as a single argument, leading to incorrect or failing invocations of
`self.generator`.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>