# Hitting rate limiter on OpenAI api

**URL:** <https://forum.rasa.com/t/hitting-rate-limiter-on-openai-api/63311>\
**Category:** Rasa CALM\
**Created:** [September 5, 2024, 5:01pm UTC](https://forum.rasa.com/t/hitting-rate-limiter-on-openai-api/63311 "2024-09-05T17:01:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackpa99](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/jackpa99/32/19598_2.png) [@jackpa99](https://forum.rasa.com/u/jackpa99)\
**Post date:** [September 5, 2024, 5:01pm UTC](https://forum.rasa.com/t/hitting-rate-limiter-on-openai-api/63311/1 "2024-09-05T17:01:33Z")

</div>

I started to run the [GitHub - RasaHQ/calm-langgraph-customer-service-comparison: A reimplementation of langgraph's customer support example in Rasa's CALM paradigm and a quantiative evaluation of the 2 approaches](https://github.com/RasaHQ/calm-langgraph-customer-service-comparison) implementation on CodeSpaces . (I obtained and updated the RASA PRO LICENSE key and OpenAI Api key in .env).

I hit an error relating to OpenAI limits:

```auto
Retrying langchain.embeddings.openai.embed_with_retry.<locals>._embed_with_retry in 8.0 seconds as it raised RateLimitError: You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.. 

```

Below is a snippet of config.yml, updated to use a cheaper model. May be willing to upgrade on the OpenAPI api package but need to know what to upgrade to…

```auto
pipeline:
- name: custom.custom_cmd_gen.CustomLLMCommandGenerator
  llm:
    model_name: gpt-4o-mini-2024-07-18
    request_timeout: 7
    max_tokens: 256
    temperature: 0
    cache: false
  prompt_template: prompt_templates/time_aware_prompt.jinja2

```
