This seems to all work?
This commit is contained in:
@@ -289,7 +289,7 @@ class TTSService(AIService):
|
||||
|
||||
async def process_frame(self, frame: Frame, direction: FrameDirection):
|
||||
await super().process_frame(frame, direction)
|
||||
print(f"_---_ai_services.py process_frame * frame: {frame}")
|
||||
# print(f"_---_ai_services.py process_frame * frame: {frame}")
|
||||
|
||||
if isinstance(frame, TextFrame):
|
||||
await self._process_text_frame(frame)
|
||||
|
||||
@@ -242,7 +242,7 @@ class BaseOpenAILLMService(LLMService):
|
||||
# yield a frame containing the function name and the arguments.
|
||||
|
||||
tool_call = chunk.choices[0].delta.tool_calls[0]
|
||||
print(f"___________________________openai.py * tool_call_id: {tool_call_id}")
|
||||
print(f"___________________________openai.py * tool_call_id: {tool_call_id} {tool_call.function.arguments}")
|
||||
if tool_call.index != func_idx:
|
||||
functions_list.append(function_name)
|
||||
arguments_list.append(arguments)
|
||||
@@ -507,7 +507,7 @@ class OpenAIAssistantContextAggregator(LLMAssistantContextAggregator):
|
||||
|
||||
async def process_frame(self, frame, direction):
|
||||
await super().process_frame(frame, direction)
|
||||
print(f"___<1>__openai.py * OpenAIAssistantContextAggregator process_frame frame : {frame}")
|
||||
# print(f"___<1>__openai.py * OpenAIAssistantContextAggregator process_frame frame : {frame}")
|
||||
# See note above about not calling push_frame() here.
|
||||
if isinstance(frame, StartInterruptionFrame):
|
||||
self._function_calls_in_progress.clear()
|
||||
@@ -530,8 +530,8 @@ class OpenAIAssistantContextAggregator(LLMAssistantContextAggregator):
|
||||
elif isinstance(frame, OpenAIImageMessageFrame):
|
||||
self._pending_image_frame_message = frame
|
||||
await self._push_aggregation()
|
||||
else:
|
||||
print(f"___<2>__openai.py * OpenAIAssistantContextAggregator process_frame frame : {frame}")
|
||||
# else:
|
||||
# print(f"___<2>__openai.py * OpenAIAssistantContextAggregator process_frame frame : {frame}")
|
||||
|
||||
async def _push_aggregation(self):
|
||||
if not (
|
||||
|
||||
Reference in New Issue
Block a user