Skip to content

Commit 6f59c3e

Browse files
committed
add general purpose function calling handler
1 parent f9471b6 commit 6f59c3e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llama_cpp/llama_chat_format.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4020,9 +4020,9 @@ def gguf_function_calling(
40204020
function_calling_template = None
40214021
if hasattr(llama, 'model_path'):
40224022
from llama_cpp.llama import Llama
4023-
metadata = Llama.get_metadata(llama.model_path)
4024-
if metadata and "tokenizer.chat.template" in metadata:
4025-
function_calling_template = metadata["tokenizer.chat.template"]
4023+
metadata = Llama.metadata
4024+
if metadata and "tokenizer.chat_template" in metadata:
4025+
function_calling_template = metadata["tokenizer.chat_template"]
40264026

40274027

40284028
function_calling_template = (

0 commit comments

Comments
 (0)