From 469e76c50b4cb6ad147937bd2140b500e07a137a Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 4 Sep 2024 13:14:28 -0700 Subject: [PATCH] Update llm.py --- modules/llm.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/llm.py b/modules/llm.py index da70150..9632346 100644 --- a/modules/llm.py +++ b/modules/llm.py @@ -126,3 +126,15 @@ def llm_query(input, nodeID=0, location_name=None): antiFloodLLM.remove(nodeID) return response + +# import subprocess +# def get_ollama_cpu(): +# try: +# psOutput = subprocess.run(['ollama', 'ps'], capture_output=True, text=True) +# if "GPU" in psOutput.stdout: +# logger.debug(f"System: Ollama process with GPU") +# else: +# logger.debug(f"System: Ollama process with CPU, query time will be slower") +# except Exception as e: +# logger.debug(f"System: Ollama process not found, {e}") +# return False