frameworks

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package frameworks provides processor integrations for external runtimes and the RTVI protocol, ported from upstream processors/frameworks.

  • External chain: calls an HTTP endpoint (e.g. a Langchain or Strands sidecar) with the last user message from LLMContextFrame and streams the response back as LLMTextFrame.
  • RTVI: Real-Time Voice Interface protocol processor for client/server messaging, bot-ready, and send-text handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalChainOptions

type ExternalChainOptions struct {
	URL           string            `json:"url"`
	Method        string            `json:"method"`         // default "POST"
	Headers       map[string]string `json:"headers"`        // optional
	TimeoutSec    int               `json:"timeout_sec"`    // 0 = 30s default
	Stream        bool              `json:"stream"`         // true = SSE or chunked streaming
	TranscriptKey string            `json:"transcript_key"` // key for input text; default "input"
}

ExternalChainOptions is the JSON shape for plugin_options["external_chain"].

type ExternalChainProcessor

type ExternalChainProcessor struct {
	*processors.BaseProcessor
	// contains filtered or unexported fields
}

ExternalChainProcessor calls an external HTTP endpoint (e.g. Langchain/Strands sidecar) with the last user message from LLMContextFrame and streams the response back as LLMTextFrame with LLMFullResponseStartFrame/LLMFullResponseEndFrame.

func NewExternalChainProcessor

func NewExternalChainProcessor(name string, url string, opts ExternalChainOptions) *ExternalChainProcessor

NewExternalChainProcessor returns a processor that forwards LLMContextFrame to the given URL. If url is empty, all frames are forwarded (no-op).

func NewExternalChainProcessorFromOptions

func NewExternalChainProcessorFromOptions(name string, opts json.RawMessage) *ExternalChainProcessor

NewExternalChainProcessorFromOptions builds an ExternalChainProcessor from plugin_options. If opts is nil or empty, url is empty (no-op).

func (*ExternalChainProcessor) ProcessFrame

ProcessFrame implements processors.Processor. On LLMContextFrame, sends last user message to the external endpoint and streams response as LLMTextFrame; other frames are forwarded.

Directories

Path Synopsis
Package rtvi implements the RTVI (Real-Time Voice Interface) protocol processor and message types.
Package rtvi implements the RTVI (Real-Time Voice Interface) protocol processor and message types.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL