https://www.boundaryml.com logo
🟡 Unexpected streaming behavior after update to 0...
# questions
q
I'm having really weird behaviors on streaming since I have update to 0.218.0. More precisely, previously, if I would give the following schema:
Copy code
class SubClass1 {
  sub1 string
}

class SubClass2 {
  sub1 string
}
class Example {
  ex SubClass1 | SubClass2
}
I would expect the stream of doing something like
Copy code
{ex: {sub1: null}}
{ex: {sub1: "some"}}
{ex: {sub1: "some text"}}
{ex: {sub1: "some text being"}}
{ex: {sub1: "some text being streamed"}}
But now I get something like
Copy code
{ex: {sub1: null}}
{ex: {sub1: "some"}}
{ex: {sub1: "some text"}}
{ex: {sub2: null}}
{ex: {sub1: "some text being"}}
{ex: {sub2: null}}
{ex: {sub1: "some text being streamed"}}
It's not related to the model. I have not changed it, and this has been tested in VSCode BAML extension. Thanks for your help
a
What version did you upgrade from?
q
I've update from 0.213.0 to 0.218.0.
a
ok we'll see what's going on here. I think i have an idea
v
this is slightly different, but really we just need to add a bit of stability in the stream, so it doesn't bounce back and forther. sometimes it resets to an preferring the empty object in the case of unions instead of the original object.