# Using Cohere as LLM provider

**URL:** <https://forum.rasa.com/t/using-cohere-as-llm-provider/63469>\
**Category:** Rasa CALM\
**Tags:** installation, community\
**Created:** [September 19, 2024, 8:34am UTC](https://forum.rasa.com/t/using-cohere-as-llm-provider/63469 "2024-09-19T08:34:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![abboudtest](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/abboudtest/32/24256_2.png) [@abboudtest](https://forum.rasa.com/u/abboudtest)\
**Post date:** [September 19, 2024, 8:34am UTC](https://forum.rasa.com/t/using-cohere-as-llm-provider/63469/1 "2024-09-19T08:34:40Z")

</div>

Hello everyone, please make sure to correct the code for langchain, it gives the following error:

`AsyncClient. __init__ () got an unexpected keyword argument 'max_retries' (type=type_error)`

The reason is that AsyncClient and Client from cohere do not have `'max_retries'` argument in the constructor

**The solution is** to remove the `max_retries` from `venv\Lib\site-packages\langchain\embeddings\cohere.py` at lines 63 and 69.

Thanks. 😀
