openai-partial-stream
openai-partial-stream copied to clipboard
Does JsonCloser work for nested objects?
I have an entity/schema that has nested objects. Even with StreamObjectKeyValueTokens, my streaming behaves more like StreamObjectKeyValue whereby one field only becomes available when its value is complete. I suspect it's because JsonCloser doesn't work with a entity/schema with nested objects.
Yeah, good observation, nested JSON objects are currently not supported. There are actually different ways to implement this, and it would be useful to know more about your use case. Could you share more details about what you're looking for with the nested JSON object? Also, how do you define an 'entity' in this context?
Could entity declaration use json path? Does it mentally work with nested entity in an array?
Json path it is something we can explore. Yeah it could help specifying which array we want to extract and stream.
Following