Documentation

Build LLM-powered agents
with production-ready TypeScript

DSPy for TypeScript. Working with LLMs is complex—they don't always do what you want. DSPy makes it easier to build amazing things with LLMs. Just define your inputs and outputs (signature) and an efficient prompt is auto-generated and used. Connect together various signatures to build complex systems and workflows using LLMs.

15+ LLM Providers
End-to-end Streaming
Auto Prompt Tuning

AxGenInput

type AxGenInput<T> = T extends AxGen<infer IN, any> ? IN : T extends AxSignature<infer IN2, any> ? IN2 : T extends AxSignatureBuilder<infer IN3, any> ? IN3 : T extends string ? ParseSignature<T> extends object ? IN4 : never : never;

Defined in: https://github.com/ax-llm/ax/blob/be56d0cb4027af0a3a23d397cd01a57261e362d4/src/ax/dsp/types.ts#L263

Type Parameters

Type Parameter
T