File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2470,6 +2470,7 @@ def base_function_calling(
2470
2470
tool_calls = True ,
2471
2471
add_generation_prompt = True ,
2472
2472
)
2473
+ print (prompt )
2473
2474
completion_or_chunks = llama .create_completion (
2474
2475
prompt = prompt ,
2475
2476
temperature = temperature ,
@@ -2495,6 +2496,7 @@ def base_function_calling(
2495
2496
)
2496
2497
completion : llama_types .CreateCompletionResponse = completion_or_chunks # type: ignore
2497
2498
text = completion ["choices" ][0 ]["text" ]
2499
+ print (text )
2498
2500
if "message" in text :
2499
2501
return _convert_completion_to_chat (
2500
2502
llama .create_completion (
@@ -3118,9 +3120,9 @@ def mixtral_function_calling(
3118
3120
mirostat_eta = mirostat_eta ,
3119
3121
model = model ,
3120
3122
logits_processor = logits_processor ,
3121
- # grammar=llama_grammar.LlamaGrammar.from_string(
3122
- # initial_gbnf_tool_grammar, verbose=llama.verbose
3123
- # ),
3123
+ grammar = llama_grammar .LlamaGrammar .from_string (
3124
+ initial_gbnf_tool_grammar , verbose = llama .verbose
3125
+ ),
3124
3126
)
3125
3127
completion : llama_types .CreateCompletionResponse = completion_or_chunks # type: ignore
3126
3128
text = completion ["choices" ][0 ]["text" ]
You can’t perform that action at this time.
0 commit comments