MCPcopy Create free account
hub / github.com/HumeAI/hume-api-examples / sending_handler

Function sending_handler

evi/evi-python-function-calling/main.py:277–295  ·  view source on GitHub ↗

Handle sending a message over the socket. This method waits 3 seconds and sends a UserInput message, which takes a `text` parameter as input. - https://dev.hume.ai/reference/empathic-voice-interface-evi/chat/chat#send.User%20Input.type See the full list of messages to send [here](h

(socket: AsyncChatSocketClient)

Source from the content-addressed store, hash-verified

275 return forecast
276
277async def sending_handler(socket: AsyncChatSocketClient):
278 """Handle sending a message over the socket.
279
280 This method waits 3 seconds and sends a UserInput message, which takes a `text` parameter as input.
281 - https://dev.hume.ai/reference/empathic-voice-interface-evi/chat/chat#send.User%20Input.type
282
283 See the full list of messages to send [here](https://dev.hume.ai/reference/empathic-voice-interface-evi/chat/chat#send).
284
285 Args:
286 socket (AsyncChatSocketClient): The WebSocket connection used to send messages.
287 """
288 # Wait 3 seconds before executing the rest of the method
289 await asyncio.sleep(3)
290
291 # Construct a user input message
292 # user_input_message = UserInput(text="Hello there!")
293
294 # Send the user input as text to the socket
295 # await socket.send_user_input(user_input_message)
296
297async def main() -> None:
298 # Retrieve any environment variables stored in the .env file

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected