cohere-ai / cohere-python

Python Library for Accessing the Cohere API
https://docs.cohere.ai
MIT License
278 stars 60 forks source link

Add thread_pool_executor to constructor #536

Closed billytrend-cohere closed 1 month ago

billytrend-cohere commented 1 month ago

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