Documentation
¶
Overview ¶
Package llm_request_parser implements the SlotOnRequest middleware that detects the LLM provider from the request URL, parses the JSON request body for model and streaming flags, and extracts the user prompt text. Emitted metadata feeds downstream middlewares (guardrail, cost meter) and the access-log terminal sink.
Index ¶
Constants ¶
const ID = "llm_request_parser"
ID is the registry key for this middleware.
const Version = "1.0.0"
Version is reported via Middleware.Version().
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct{}
Factory builds llm_request_parser instances from raw config bytes.
func (Factory) New ¶
func (Factory) New(rawConfig []byte) (middleware.Middleware, error)
New constructs a middleware instance. Empty, null, and {} configs are accepted; non-empty rawConfig that fails to unmarshal is rejected so misconfigurations surface at chain build time.