[WIP] AWS Nova Sonic service - fix comment
This commit is contained in:
@@ -73,6 +73,7 @@ class AWSNovaSonicLLMContext(OpenAILLMContext):
|
|||||||
|
|
||||||
# Process remaining messages to fill out conversation history.
|
# Process remaining messages to fill out conversation history.
|
||||||
# Nova Sonic supports "user" and "assistant" messages in history.
|
# Nova Sonic supports "user" and "assistant" messages in history.
|
||||||
|
print(f"[pk] standard messages: {messages}")
|
||||||
for message in messages:
|
for message in messages:
|
||||||
history_message = self.from_standard_message(message)
|
history_message = self.from_standard_message(message)
|
||||||
if history_message:
|
if history_message:
|
||||||
@@ -134,9 +135,9 @@ class AWSNovaSonicAssistantContextAggregator(OpenAIAssistantContextAggregator):
|
|||||||
async def handle_function_call_result(self, frame: FunctionCallResultFrame):
|
async def handle_function_call_result(self, frame: FunctionCallResultFrame):
|
||||||
await super().handle_function_call_result(frame)
|
await super().handle_function_call_result(frame)
|
||||||
|
|
||||||
# The standard function callback code path pushes the FunctionCallResultFrame from the llm itself,
|
# The standard function callback code path pushes the FunctionCallResultFrame from the LLM
|
||||||
# so we didn't have a chance to add the result to the openai realtime api context. Let's push a
|
# itself, so we didn't have a chance to add the result to the AWS Nova Sonic server-side
|
||||||
# special frame to do that.
|
# context. Let's push a special frame to do that.
|
||||||
await self.push_frame(
|
await self.push_frame(
|
||||||
AWSNovaSonicFunctionCallResultFrame(result_frame=frame), FrameDirection.UPSTREAM
|
AWSNovaSonicFunctionCallResultFrame(result_frame=frame), FrameDirection.UPSTREAM
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user