How do you get the usageMetadata when using a content stream?

When using the JS SDK and creating a chat stream, is there any way to get the usage metadata? As the response is being chunked back, rather than returned as an object, it’s just a pure text stream. Is the metadata still stored somewhere internally we can get at?