Protected ReadonlydeserializerProtecteddeserializersMap of registered deserializers, keyed by content kind.
Protected ReadonlyloggerDeserializes the given serialized content data into a ChatResponseContent instance.
The registry looks up the appropriate deserializer based on the kind property
of the serialized data and delegates to that deserializer's deserialize method.
If no deserializer is found for the content kind, an UnknownChatResponseContentImpl
instance is returned with the original data and fallback message preserved.
A warning is also logged with the missing kind and available kinds.
The serialized content data to deserialize
The deserialized content, or a Promise that resolves to the deserialized content
ProtectedinitInitializes the registry by collecting deserializers from all contributions.
This method is automatically called after construction due to the @postConstruct decorator.
Registers a deserializer for a specific content kind.
If a deserializer for the same kind is already registered, it will be replaced.
The deserializer to register
Default implementation of the chat content deserializer registry.
This registry collects deserializers from all bound
ChatContentDeserializerContributioninstances during its post-construction initialization phase. Deserializers are stored in a map keyed by their content kind.The registry handles unknown content types gracefully by returning an
UnknownChatResponseContentImplinstance when no deserializer is found, ensuring that chat sessions can still be loaded even if some content types are no longer supported or available.See
ChatContentDeserializerRegistry for the interface definition