Closed lukeocodes closed 1 month ago
Oooooo. Elaborate the namespace? You mean we can abstract the client classes? Like 'PrerecordedClient' class?
You'll be able to configure listen separately of read, speak etc from the client options. Examples in the PR. using the classes directly is possible but risky, as it's not a public interface it can change without a major version increase
On Mon, 6 May 2024, 07:29 Dennis Lysenko, @.***> wrote:
Oooooo. Elaborate the namespace? You mean we can abstract the client classes? Like 'PrerecordedClient' class?
— Reply to this email directly, view it on GitHub https://github.com/deepgram/deepgram-js-sdk/pull/273#issuecomment-2095278626, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHJPARIV4SFGBU2BHMIGUDZA4POBAVCNFSM6AAAAABG7GASTWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJVGI3TQNRSGY . You are receiving this because you were assigned.Message ID: @.***>
Does this allow us to set a fetch timeout or abort signal? That would be so helpful ❤️
The only reason I would override the class is to include an abort signal code so I can attach the signal property to the fetch request.
The only reason I would override the class is to include an abort signal code so I can attach the signal property to the fetch request.
Depends on the environment. As far as I know, you cannot provide Fetch a custom timeout, but you'll be able to create your own fetch wrapper than maybe even uses http/https instead, and bridges the compability layer.
You'll definitely be able to provide it a signal controller though.
Full compatible with existing config (through a legacy config transformer)
The client options will look like this for custom headers for Fetch and WS Node clients;
Namespace configurations are coming, too.
You'll now be able to provide config to specific namespaces in the SDK.
Finally, for the holy grail of overriding a client, which will also be available in namespace config, and will have access to the namespaceOptions scope.