Skip to content

Conversation

@sheen4n
Copy link

@sheen4n sheen4n commented Jan 14, 2026

Implement the _handle_messages_append method for OpenAIRealtimeLLMService and OpenAIRealtimeBetaLLMService to support programmatic message injection and bot response triggering.

This enables use cases like:

  • Making the bot speak first by injecting a prompt message
  • Adding context messages to the conversation programmatically
  • Triggering responses without audio input

The implementation:

  • Converts messages from LLMMessagesAppendFrame to ConversationItem objects
  • Uses "input_text" content type for user messages, "text" for others
  • Sends each message via ConversationItemCreateEvent
  • Triggers ResponseCreateEvent if frame.run_llm is True

Implement the _handle_messages_append method for OpenAIRealtimeLLMService
and OpenAIRealtimeBetaLLMService to support programmatic message injection
and bot response triggering.

This enables use cases like:
- Making the bot speak first by injecting a prompt message
- Adding context messages to the conversation programmatically
- Triggering responses without audio input

The implementation:
- Converts messages from LLMMessagesAppendFrame to ConversationItem objects
- Uses "input_text" content type for user messages, "text" for others
- Sends each message via ConversationItemCreateEvent
- Triggers ResponseCreateEvent if frame.run_llm is True

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant