inworld_realtime_adapter
Inworld Realtime LLM adapter for Pipecat.
Converts Pipecat’s tool schemas and context into the format required by Inworld’s Realtime API.
- class pipecat.adapters.services.inworld_realtime_adapter.InworldRealtimeLLMInvocationParams[source]
Bases:
TypedDictContext-based parameters for invoking Inworld Realtime API.
- system_instruction
System prompt/instructions for the session.
- Type:
str | None
- messages
List of conversation items formatted for Inworld Realtime.
- tools
List of tool definitions.
- Type:
list[dict[str, Any]]
- system_instruction: str | None
- messages: list[ConversationItem]
- tools: list[dict[str, Any]]
- class pipecat.adapters.services.inworld_realtime_adapter.InworldRealtimeLLMAdapter[source]
Bases:
BaseLLMAdapterLLM adapter for Inworld Realtime API.
Converts Pipecat’s universal context and tool schemas into the specific format required by Inworld’s Realtime API.
- property id_for_llm_specific_messages: str
Get the identifier used in LLMSpecificMessage instances for Inworld Realtime.
- get_llm_invocation_params(context: LLMContext, *, system_instruction: str | None = None) InworldRealtimeLLMInvocationParams[source]
Get Inworld Realtime-specific LLM invocation parameters from a universal LLM context.
- Parameters:
context – The LLM context containing messages, tools, etc.
system_instruction – Optional system instruction from service settings.
- Returns:
Dictionary of parameters for invoking Inworld’s Realtime API.
- get_messages_for_logging(context) list[dict[str, Any]][source]
Get messages from context in a format safe for logging.
Binary data (images, audio) is replaced with short placeholders.
- Parameters:
context – The LLM context containing messages.
- Returns:
List of messages with sensitive data redacted.
- class ConvertedMessages(messages: list[ConversationItem], system_instruction: str | None = None)[source]
Bases:
objectContainer for Inworld-formatted messages converted from universal context.
- messages: list[ConversationItem]
- system_instruction: str | None = None
- to_provider_tools_format(tools_schema: ToolsSchema) list[dict[str, Any]][source]
Convert tool schemas to Inworld Realtime format.
- Parameters:
tools_schema – The tools schema containing functions to convert.
- Returns:
List of tool definitions in Inworld Realtime format.