include content in the message even if you have parsed out a tool call

This commit is contained in:
Ashwin Bharambe 2025-04-12 11:23:25 -07:00
parent 771daa4b91
commit 14ff4c647c
3 changed files with 1 additions and 3 deletions

View file

@ -226,7 +226,6 @@ class ChatFormat:
arguments_json=json.dumps(tool_arguments),
)
)
content = ""
return RawMessage(
role="assistant",

View file

@ -301,7 +301,6 @@ class ChatFormat:
arguments=tool_arguments,
)
)
content = ""
return RawMessage(
role="assistant",

View file

@ -452,7 +452,7 @@ class MetaReferenceInferenceImpl(
for token_results in self.generator.chat_completion(request_batch):
first = token_results[0]
if not first.finished:
if not first.finished and not first.ignore_token:
if os.environ.get("LLAMA_MODELS_DEBUG", "0") in ("1", "2"):
cprint(first.text, "cyan", end="")
if os.environ.get("LLAMA_MODELS_DEBUG", "0") == "2":