mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-03 09:21:45 +00:00
include content in the message even if you have parsed out a tool call
This commit is contained in:
parent
771daa4b91
commit
14ff4c647c
3 changed files with 1 additions and 3 deletions
|
@ -226,7 +226,6 @@ class ChatFormat:
|
||||||
arguments_json=json.dumps(tool_arguments),
|
arguments_json=json.dumps(tool_arguments),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
content = ""
|
|
||||||
|
|
||||||
return RawMessage(
|
return RawMessage(
|
||||||
role="assistant",
|
role="assistant",
|
||||||
|
|
|
@ -301,7 +301,6 @@ class ChatFormat:
|
||||||
arguments=tool_arguments,
|
arguments=tool_arguments,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
content = ""
|
|
||||||
|
|
||||||
return RawMessage(
|
return RawMessage(
|
||||||
role="assistant",
|
role="assistant",
|
||||||
|
|
|
@ -452,7 +452,7 @@ class MetaReferenceInferenceImpl(
|
||||||
|
|
||||||
for token_results in self.generator.chat_completion(request_batch):
|
for token_results in self.generator.chat_completion(request_batch):
|
||||||
first = token_results[0]
|
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"):
|
if os.environ.get("LLAMA_MODELS_DEBUG", "0") in ("1", "2"):
|
||||||
cprint(first.text, "cyan", end="")
|
cprint(first.text, "cyan", end="")
|
||||||
if os.environ.get("LLAMA_MODELS_DEBUG", "0") == "2":
|
if os.environ.get("LLAMA_MODELS_DEBUG", "0") == "2":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue