mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-31 15:10:02 +00:00
multi-turn tool call test
This commit is contained in:
parent
3021c87271
commit
eafbde4e17
2 changed files with 60 additions and 0 deletions
|
|
@ -338,6 +338,10 @@ class MetaReferenceInferenceImpl(
|
|||
stop_reason = None
|
||||
|
||||
for token_result in self.generator.chat_completion(request):
|
||||
from termcolor import cprint
|
||||
|
||||
cprint(token_result.text, "cyan", end="")
|
||||
|
||||
tokens.append(token_result.token)
|
||||
|
||||
if token_result.token == tokenizer.eot_id:
|
||||
|
|
@ -386,6 +390,10 @@ class MetaReferenceInferenceImpl(
|
|||
ipython = False
|
||||
|
||||
for token_result in self.generator.chat_completion(request):
|
||||
from termcolor import cprint
|
||||
|
||||
cprint(token_result.text, "cyan", end="")
|
||||
|
||||
tokens.append(token_result.token)
|
||||
|
||||
if not ipython and token_result.text.startswith("<|python_tag|>"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue