File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -406,15 +406,11 @@ def _handle_streaming_tool_calls(
406406 accumulated_text = ""
407407 for chunk in completion_chunks :
408408 text = chunk ["choices" ][0 ]["text" ]
409- print ("TEXT" , text )
410409 accumulated_text += text
411410 stop_reason = chunk ["choices" ][0 ]["finish_reason" ]
412411
413- print ("STOP REASON" , stop_reason )
414-
415412 # Check if we hit a tool call
416413 if (stop_reason == "stop:<tool_call>" ):
417- print ("TOOL CALL FOUND" )
418414
419415 accumulated_text += "<tool_call>"
420416
@@ -439,7 +435,7 @@ def _handle_streaming_tool_calls(
439435 name_completion = llama .create_completion (
440436 prompt = combined_prompt ,
441437 grammar = name_grammar ,
442- temperature = 0 ,
438+ temperature = 0.0 ,
443439 stream = False ,
444440 stop = [], # Grammar will handle the format including colon
445441 ** {k : v for k , v in base_completion_kwargs .items () if k != "stream" and k != "grammar" }
@@ -545,7 +541,6 @@ def _handle_streaming_tool_calls(
545541 }]
546542 }
547543 except Exception as e :
548- print ("ERROR" , e )
549544 # Fall back to regular streaming without grammar
550545 fallback_prompt = prompt + llama .tokenize (accumulated_text .encode ("utf-8" ), add_bos = False , special = True )
551546 for chunk in llama .create_completion (
You can’t perform that action at this time.
0 commit comments