From e546866f78e12d177178d532957324687ecd28c2 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 4 Sep 2024 09:40:57 -0700 Subject: [PATCH] Update llm.py --- modules/llm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/llm.py b/modules/llm.py index 81666d3..da70150 100644 --- a/modules/llm.py +++ b/modules/llm.py @@ -12,6 +12,7 @@ from googlesearch import search # pip install googlesearch-python # LLM System Variables llmEnableHistory = False llmContext_fromGoogle = True +googleSearchResults = 3 llm_history_limit = 6 # limit the history to 3 messages (come in pairs) antiFloodLLM = [] llmChat_history = [] @@ -86,7 +87,7 @@ def llm_query(input, nodeID=0, location_name=None): # grab some context from the internet using google search hits (if available) # localization details at https://pypi.org/project/googlesearch-python/ try: - googleSearch = search(input, advanced=True, num_results=3) + googleSearch = search(input, advanced=True, num_results=googleSearchResults) if googleSearch: for result in googleSearch: # SearchResult object has url= title= description= just grab title and description