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

AxAIServiceOptions

type AxAIServiceOptions = object;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L449

Properties

abortSignal?

optional abortSignal: AbortSignal;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L457


corsProxy?

optional corsProxy: string;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L474


debug?

optional debug: boolean;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L450


debugHideSystemPrompt?

optional debugHideSystemPrompt: boolean;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L460


excludeContentFromTrace?

optional excludeContentFromTrace: boolean;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L456


fetch?

optional fetch: typeof fetch;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L452


functionCallMode?

optional functionCallMode: "auto" | "native" | "prompt";

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L463


logger?

optional logger: AxLoggerFunction;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L458


meter?

optional meter: Meter;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L454


rateLimiter?

optional rateLimiter: AxRateLimiterFunction;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L451


sessionId?

optional sessionId: string;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L459


showThoughts?

optional showThoughts: boolean;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L471


stepIndex?

optional stepIndex: number;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L473


stream?

optional stream: boolean;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L462


thinkingTokenBudget?

optional thinkingTokenBudget: "minimal" | "low" | "medium" | "high" | "highest" | "none";

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L464


timeout?

optional timeout: number;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L455


traceContext?

optional traceContext: Context;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L461


tracer?

optional tracer: Tracer;

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L453


useExpensiveModel?

optional useExpensiveModel: "yes";

Defined in: https://github.com/ax-llm/ax/blob/b50783a160295ce34ac10dcaf3bd8fff4a01d535/src/ax/ai/types.ts#L472