reichaves commited on
Commit
57d8b73
·
unverified ·
1 Parent(s): 81f9a82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -22,6 +22,8 @@ import requests
22
  from bs4 import BeautifulSoup
23
  from langchain_core.documents import Document
24
  from tenacity import retry, wait_exponential, stop_after_attempt, retry_if_exception_type
 
 
25
 
26
  # Configurar o tema para dark
27
  st.set_page_config(page_title="RAG Q&A Conversacional", layout="wide", initial_sidebar_state="expanded", page_icon="🤖", menu_items=None)
@@ -185,6 +187,9 @@ class RateLimitedChatGroq(BaseChatModel):
185
  st.error(f"An error occurred while processing your request: {str(e)}")
186
  raise e
187
 
 
 
 
188
  @property
189
  def _llm_type(self):
190
  return "rate_limited_chat_groq"
 
22
  from bs4 import BeautifulSoup
23
  from langchain_core.documents import Document
24
  from tenacity import retry, wait_exponential, stop_after_attempt, retry_if_exception_type
25
+ from langchain_core.language_models.chat_models import BaseChatModel
26
+ from langchain_core.outputs import ChatResult
27
 
28
  # Configurar o tema para dark
29
  st.set_page_config(page_title="RAG Q&A Conversacional", layout="wide", initial_sidebar_state="expanded", page_icon="🤖", menu_items=None)
 
187
  st.error(f"An error occurred while processing your request: {str(e)}")
188
  raise e
189
 
190
+ def _generate(self, messages, stop=None, run_manager=None, **kwargs) -> ChatResult:
191
+ return self.llm._generate(messages, stop=stop, run_manager=run_manager, **kwargs)
192
+
193
  @property
194
  def _llm_type(self):
195
  return "rate_limited_chat_groq"