Spaces:
Running
Running
Update ai_logic.py
Browse files- ai_logic.py +2 -2
ai_logic.py
CHANGED
@@ -152,7 +152,7 @@ def get_all_blog_links(url: str) -> set:
|
|
152 |
if current_url in visited:
|
153 |
continue
|
154 |
try:
|
155 |
-
response = requests.get(current_url, timeout=
|
156 |
soup = BeautifulSoup(response.content, 'html.parser')
|
157 |
visited.add(current_url)
|
158 |
for link in soup.find_all('a', href=True):
|
@@ -277,7 +277,7 @@ class HuggingFaceInferenceClient:
|
|
277 |
else:
|
278 |
return False, f"Erro: {str(e)[:100]}"
|
279 |
|
280 |
-
def query_model(self, model_name: str, messages: List[Dict], max_tokens: int =
|
281 |
"""Faz requisição ao modelo usando chat completion."""
|
282 |
try:
|
283 |
client = self.get_client(model_name)
|
|
|
152 |
if current_url in visited:
|
153 |
continue
|
154 |
try:
|
155 |
+
response = requests.get(current_url, timeout=60)
|
156 |
soup = BeautifulSoup(response.content, 'html.parser')
|
157 |
visited.add(current_url)
|
158 |
for link in soup.find_all('a', href=True):
|
|
|
277 |
else:
|
278 |
return False, f"Erro: {str(e)[:100]}"
|
279 |
|
280 |
+
def query_model(self, model_name: str, messages: List[Dict], max_tokens: int = 2000, temperature: float = 0.5) -> str:
|
281 |
"""Faz requisição ao modelo usando chat completion."""
|
282 |
try:
|
283 |
client = self.get_client(model_name)
|