Skip to content

Commit c5964d9

Browse files
aelisseekibergus
authored andcommitted
internal change
PiperOrigin-RevId: 830439630
1 parent eb242cd commit c5964d9

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

genai_processors/core/function_calling.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,7 @@ async def call(
510510
input_queue.put_nowait(content_api.END_OF_TURN)
511511
state.has_new_fn_calls = False
512512
state.schedule_model_call = False
513-
elif (
514-
state.schedule_model_call and not state.model_outputting
515-
): # or state.has_new_fn_calls:
513+
elif state.schedule_model_call and not state.model_outputting:
516514
input_queue.put_nowait(content_api.END_OF_TURN)
517515
state.has_new_fn_calls = False
518516
state.schedule_model_call = False

genai_processors/core/web.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ async def call(
9797

9898
# Iterate over the response chunks
9999
html_content = []
100-
async for chunk in response.aiter_bytes():
101-
html_content.append(chunk.decode(response.encoding or 'utf-8'))
100+
async for chunk in response.aiter_text():
101+
html_content.append(chunk)
102102
yield content_api.ProcessorPart(
103103
''.join(html_content), mimetype=mime_types.TEXT_HTML
104104
)

0 commit comments

Comments
 (0)