The PR introduces changes to the Client and AsyncClient classes in src/cohere/client.py.
Summary
The changes add a _executor attribute to both classes and set its value during initialization. The ThreadPoolExecutor is now passed as an argument during initialization, allowing for more flexibility and customization.
Changes
The _executor attribute is added to the Client and AsyncClient classes.
During initialization, the thread_pool_executor argument is added to the __init__ method of both classes.
The value of self._executor is set to the provided thread_pool_executor argument.
The previous instantiation of _executor outside the methods is removed.
The PR introduces changes to the
Client
andAsyncClient
classes insrc/cohere/client.py
.Summary
The changes add a
_executor
attribute to both classes and set its value during initialization. TheThreadPoolExecutor
is now passed as an argument during initialization, allowing for more flexibility and customization.Changes
_executor
attribute is added to theClient
andAsyncClient
classes.thread_pool_executor
argument is added to the__init__
method of both classes.self._executor
is set to the providedthread_pool_executor
argument._executor
outside the methods is removed.