Skip to content

Commit b2ca084

Browse files
committed
add general purpose function calling handler
1 parent 22a16bd commit b2ca084

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
@@ -4158,9 +4158,9 @@ def gguf_function_calling(
41584158
function_calling_template = None
41594159
if hasattr(llama, 'model_path'):
41604160
from llama_cpp.llama import Llama
4161-
metadata = Llama.get_metadata(llama.model_path)
4162-
if metadata and "tokenizer.chat.template" in metadata:
4163-
function_calling_template = metadata["tokenizer.chat.template"]
4161+
metadata = Llama.metadata
4162+
if metadata and "tokenizer.chat_template" in metadata:
4163+
function_calling_template = metadata["tokenizer.chat_template"]
41644164

41654165

41664166
function_calling_template = (

0 commit comments

Comments
 (0)