Skip to content

Commit

Permalink
Support chat metadata messages in the MicrophoneInterface (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorybchris authored May 30, 2024
1 parent a794304 commit 92d1926
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions hume/_voice/microphone/chat_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ async def _recv(self, *, socket: VoiceSocket) -> None:
content = "Let's start over"
await self.sender.send_tool_response(socket=socket, tool_call_id=tool_call_id, content=content)
continue
elif message["type"] == "chat_metadata":
message_type = message["type"].upper()
chat_id = message["chat_id"]
chat_group_id = message["chat_group_id"]
text = f"<{message_type}> Chat ID: {chat_id}, Chat Group ID: {chat_group_id}"
else:
message_type = message["type"].upper()
text = f"<{message_type}>"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ line-length = 120

[tool.covcheck.group.unit.coverage]
branch = 42.0
line = 71.0
line = 70.0

[tool.covcheck.group.service.coverage]
branch = 56.0
Expand Down

0 comments on commit 92d1926

Please sign in to comment.