Skip to main content

Crate nestrs_ai

Crate nestrs_ai 

Source
Expand description

NestJS @nestjs/ai analogue — named LanguageModels, AiService::generate_text / AiService::generate_object, agent tools via AgentToolRegistry, and FakeModel for tests.

Model calls run under nestrs_resilience (timeout + jittered retry). AiService::generate_object fails closed on invalid JSON or missing required schema fields. Tool handlers must enforce the caller’s authorization.

Umbrella feature: nestrs / ai (implies resilience) → nestrs::ai.

Structs§

AgentFunction
AgentToolRegistry
AiModelConfig
AiModule
AiOptions
AiService
DynamicModule
Runtime-composed module unit for conditional imports (feature flags, env switches, plugins).
FakeModel
NestJS FakeModel analogue — scripted answers for tests.
GenerateObjectRequest
GenerateResult
GenerateTextRequest
ProviderRegistry

Enums§

AiError

Traits§

Injectable
Application service or provider type constructed through the DI container.
LanguageModel