Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -107,7 +107,7 @@ async def generate_report(query: QueryModel):
|
|
107 |
try:
|
108 |
urls, optimized_search_query = search_brave(search_query, num_results=8)
|
109 |
all_text_with_urls = fetch_and_extract_content(data_format, urls, optimized_search_query)
|
110 |
-
reference = limit_tokens(str(all_text_with_urls))
|
111 |
user_prompt_final = user_prompt_final.format(description=description, reference=reference)
|
112 |
except Exception as e:
|
113 |
print(e)
|
|
|
107 |
try:
|
108 |
urls, optimized_search_query = search_brave(search_query, num_results=8)
|
109 |
all_text_with_urls = fetch_and_extract_content(data_format, urls, optimized_search_query)
|
110 |
+
reference = limit_tokens(str(all_text_with_urls),token_limit=5000)
|
111 |
user_prompt_final = user_prompt_final.format(description=description, reference=reference)
|
112 |
except Exception as e:
|
113 |
print(e)
|