mirror of
https://github.com/wahyd4/FreeAskInternet.git
synced 2026-08-08 21:00:14 +10:00
reduce prompt context length
This commit is contained in:
Binary file not shown.
@@ -167,7 +167,9 @@ def chat(prompt, stream=True, debug=False):
|
||||
def ask_internet(query:str, debug=False):
|
||||
|
||||
content_list = search_web_ref(query,debug=debug)
|
||||
prompt = gen_prompt(query,content_list,context_length_limit=8000,debug=debug)
|
||||
if debug:
|
||||
print(content_list)
|
||||
prompt = gen_prompt(query,content_list,context_length_limit=7000,debug=debug)
|
||||
total_token = ""
|
||||
|
||||
for token in chat(prompt=prompt):
|
||||
|
||||
Reference in New Issue
Block a user