Skip to main content

Module sampling

Module sampling 

Source
Expand description

Sampling provider trait for tool-internal LLM access.

Allows tools and middleware to request LLM completions without taking a hard dependency on a specific model or MCP transport. Zero LLM calls happen during indexing — sampling is only invoked when explicitly needed (e.g. community summary generation, hierarchical narrowing ranking).

Structs§

NoopSamplingProvider
A sampling provider that is always unavailable.
SamplingRequest
A request to the LLM for a text completion.
SamplingResponse
A response from the LLM.

Enums§

SamplingError
Error from a sampling call.

Traits§

SamplingProvider
Provides LLM sampling for tool-internal use.