Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -80,7 +80,7 @@ async def generate_report(query: QueryModel):
|
|
80 |
if query.internet:
|
81 |
search_query = re.sub(r'[^\w\s]', '', description).strip()
|
82 |
try:
|
83 |
-
urls, optimized_search_query =
|
84 |
all_text_with_urls = fetch_and_extract_content(data_format, urls, query_str)
|
85 |
additional_context = limit_tokens(str(all_text_with_urls))
|
86 |
prompt = f"#### COMPLETE THE TASK: {description} #### IN THE CONTEXT OF ### CONTEXT: {query_str} USING THE #### SCRAPED DATA:{additional_context}"
|
|
|
80 |
if query.internet:
|
81 |
search_query = re.sub(r'[^\w\s]', '', description).strip()
|
82 |
try:
|
83 |
+
urls, optimized_search_query = search_brave(search_query, num_results=4)
|
84 |
all_text_with_urls = fetch_and_extract_content(data_format, urls, query_str)
|
85 |
additional_context = limit_tokens(str(all_text_with_urls))
|
86 |
prompt = f"#### COMPLETE THE TASK: {description} #### IN THE CONTEXT OF ### CONTEXT: {query_str} USING THE #### SCRAPED DATA:{additional_context}"
|