From 14ea387512733104ac3950167fbc23356af6fe4e Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 19 Mar 2026 09:33:30 -0600 Subject: [PATCH] Change order of information for llama.cpp --- frigate/genai/llama_cpp.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/frigate/genai/llama_cpp.py b/frigate/genai/llama_cpp.py index ac698b3b68..48ea9747c3 100644 --- a/frigate/genai/llama_cpp.py +++ b/frigate/genai/llama_cpp.py @@ -64,7 +64,12 @@ class LlamaCppClient(GenAIClient): return None try: - content = [] + content = [ + { + "type": "text", + "text": prompt, + } + ] for image in images: encoded_image = base64.b64encode(image).decode("utf-8") content.append( @@ -75,12 +80,6 @@ class LlamaCppClient(GenAIClient): }, } ) - content.append( - { - "type": "text", - "text": prompt, - } - ) # Build request payload with llama.cpp native options payload = {