Soumya-Kushwaha / SQL-Chat

Chat with MYSQL database
Apache License 2.0
3 stars 1 forks source link

groq.RateLimitError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app). #1

Closed linkspreed closed 4 months ago

linkspreed commented 5 months ago

After deploying the code on Streamlit Share, we encountered the following error:

groq.RateLimitError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app).

Traceback:

File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script exec(code, module.dict) File "/mount/src/mysql_ai/app.py", line 163, in response = get_response(user_query, st.session_state.db, st.session_state.conversation_history) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/mount/src/mysql_ai/app.py", line 94, in get_response return chain.invoke({ ^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 2053, in invoke input = step.invoke( ^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/langchain_core/runnables/passthrough.py", line 415, in invoke return self._call_with_config(self._invoke, input, config, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 1246, in _call_with_config context.run( File "/home/adminuser/venv/lib/python3.11/site-packages/langchain_core/runnables/config.py", line 326, in call_func_with_variable_args return func(input, kwargs) # type: ignore[call-arg] ^^^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/langchain_core/runnables/passthrough.py", line 402, in _invoke *self.mapper.invoke( ^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 2692, in invoke output = {key: future.result() for key, future in zip(steps, futures)} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 2692, in output = {key: future.result() for key, future in zip(steps, futures)} ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 456, in result return self.get_result() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 401, in get_result raise self._exception File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(self.args, self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 2053, in invoke input = step.invoke( ^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", line 166, in invoke self.generate_prompt( File "/home/adminuser/venv/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", line 544, in generate_prompt return self.generate(prompt_messages, stop=stop, callbacks=callbacks, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", line 408, in generate raise e File "/home/adminuser/venv/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", line 398, in generate self._generate_with_cache( File "/home/adminuser/venv/lib/python3.11/site-packages/langchain_core/language_models/chat_models.py", line 577, in _generate_with_cache return self._generate( ^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/langchain_groq/chat_models.py", line 220, in _generate response = self.client.create(messages=message_dicts, **params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/groq/resources/chat/completions.py", line 175, in create return self._post( ^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/groq/_base_client.py", line 1189, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/groq/_base_client.py", line 891, in request return self._request( ^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/groq/_base_client.py", line 967, in _request return self._retry_request( ^^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/groq/_base_client.py", line 1015, in _retry_request return self._request( ^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/groq/_base_client.py", line 967, in _request return self._retry_request( ^^^^^^^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/groq/_base_client.py", line 1015, in _retry_request return self._request( ^^^^^^^^^^^^^^ File "/home/adminuser/venv/lib/python3.11/site-packages/groq/_base_client.py", line 982, in _request raise self._make_status_error_from_response(err.response) from None

linkspreed commented 5 months ago

https://linkspreed-mysql-ai.streamlit.app/

linkspreed commented 5 months ago

RateLimitError: Error code: 429 - {'error': {'message': 'Rate limit reached for

model mixtral-8x7b-32768 in organization org_01hx99gtt4emwry3htphthzdy1 on

tokens per minute (TPM): Limit 5000, Used 0, Requested ~26956. Please try again

in 4m23.472s. Visit https://console.groq.com/docs/rate-limits for more

information.', 'type': 'tokens', 'code': 'rate_limit_exceeded'}}