Skip to content

Commit 2618a3f

Browse files
committed
add general purpose function calling handler
1 parent 1518ed1 commit 2618a3f

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
@@ -4167,9 +4167,9 @@ def gguf_function_calling(
41674167
function_calling_template = None
41684168
if hasattr(llama, 'model_path'):
41694169
from llama_cpp.llama import Llama
4170-
metadata = Llama.get_metadata(llama.model_path)
4171-
if metadata and "tokenizer.chat.template" in metadata:
4172-
function_calling_template = metadata["tokenizer.chat.template"]
4170+
metadata = Llama.metadata
4171+
if metadata and "tokenizer.chat_template" in metadata:
4172+
function_calling_template = metadata["tokenizer.chat_template"]
41734173

41744174

41754175
function_calling_template = (

0 commit comments

Comments
 (0)