Shreyas094
commited on
Commit
•
59ce7af
1
Parent(s):
4f6bc65
Update app.py
Browse files
app.py
CHANGED
@@ -272,7 +272,7 @@ def generate_chunked_response(prompt, model, max_tokens=10000, num_calls=3, temp
|
|
272 |
return final_response
|
273 |
|
274 |
class SimpleDDGSearch:
|
275 |
-
def search(self, query: str, num_results: int =
|
276 |
results = DDGS().text(query, region='wt-wt', safesearch='off', max_results=num_results)
|
277 |
return [res["href"] for res in results]
|
278 |
|
@@ -502,7 +502,7 @@ def create_web_search_vectors(search_results):
|
|
502 |
|
503 |
def get_response_with_search(query, model, num_calls=3, temperature=0.2):
|
504 |
searcher = SimpleDDGSearch()
|
505 |
-
search_results = searcher.search(query, num_results=
|
506 |
|
507 |
crawler = TrafilaturaWebCrawler()
|
508 |
context = ""
|
|
|
272 |
return final_response
|
273 |
|
274 |
class SimpleDDGSearch:
|
275 |
+
def search(self, query: str, num_results: int = 3):
|
276 |
results = DDGS().text(query, region='wt-wt', safesearch='off', max_results=num_results)
|
277 |
return [res["href"] for res in results]
|
278 |
|
|
|
502 |
|
503 |
def get_response_with_search(query, model, num_calls=3, temperature=0.2):
|
504 |
searcher = SimpleDDGSearch()
|
505 |
+
search_results = searcher.search(query, num_results=3)
|
506 |
|
507 |
crawler = TrafilaturaWebCrawler()
|
508 |
context = ""
|