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

AxMockAIServiceConfig

type AxMockAIServiceConfig<TModelKey> = object;

Defined in: https://github.com/ax-llm/ax/blob/a8847bd2906efff202fde10d776fddd20fd2ff57/src/ax/ai/mock/api.ts#L19

Type Parameters

Type Parameter
TModelKey

Properties

chatResponse?

optional chatResponse: 
  | AxChatResponse
  | ReadableStream<AxChatResponse>
  | () => Promise<
  | AxChatResponse
  | ReadableStream<AxChatResponse>>
  | (req: Readonly<AxChatRequest<unknown>>, options?: Readonly<AxAIServiceOptions>) => Promise<
  | AxChatResponse
| ReadableStream<AxChatResponse>>;

Defined in: https://github.com/ax-llm/ax/blob/a8847bd2906efff202fde10d776fddd20fd2ff57/src/ax/ai/mock/api.ts#L32


embedModelInfo?

optional embedModelInfo: AxModelInfoWithProvider;

Defined in: https://github.com/ax-llm/ax/blob/a8847bd2906efff202fde10d776fddd20fd2ff57/src/ax/ai/mock/api.ts#L23


embedResponse?

optional embedResponse: 
  | AxEmbedResponse
  | (req: Readonly<AxEmbedRequest>) => 
  | AxEmbedResponse
| Promise<AxEmbedResponse>;

Defined in: https://github.com/ax-llm/ax/blob/a8847bd2906efff202fde10d776fddd20fd2ff57/src/ax/ai/mock/api.ts#L41


errorMessage?

optional errorMessage: string;

Defined in: https://github.com/ax-llm/ax/blob/a8847bd2906efff202fde10d776fddd20fd2ff57/src/ax/ai/mock/api.ts#L47


features?

optional features: object;

Defined in: https://github.com/ax-llm/ax/blob/a8847bd2906efff202fde10d776fddd20fd2ff57/src/ax/ai/mock/api.ts#L24

functions?

optional functions: boolean;

media?

optional media: Partial<AxAIFeatures["media"]>;

streaming?

optional streaming: boolean;

structuredOutputs?

optional structuredOutputs: boolean;

id?

optional id: string;

Defined in: https://github.com/ax-llm/ax/blob/a8847bd2906efff202fde10d776fddd20fd2ff57/src/ax/ai/mock/api.ts#L21


latencyMs?

optional latencyMs: number;

Defined in: https://github.com/ax-llm/ax/blob/a8847bd2906efff202fde10d776fddd20fd2ff57/src/ax/ai/mock/api.ts#L48


modelInfo?

optional modelInfo: Partial<AxModelInfoWithProvider>;

Defined in: https://github.com/ax-llm/ax/blob/a8847bd2906efff202fde10d776fddd20fd2ff57/src/ax/ai/mock/api.ts#L22


models?

optional models: AxAIModelList<TModelKey>;

Defined in: https://github.com/ax-llm/ax/blob/a8847bd2906efff202fde10d776fddd20fd2ff57/src/ax/ai/mock/api.ts#L30


name?

optional name: string;

Defined in: https://github.com/ax-llm/ax/blob/a8847bd2906efff202fde10d776fddd20fd2ff57/src/ax/ai/mock/api.ts#L20


options?

optional options: AxAIServiceOptions;

Defined in: https://github.com/ax-llm/ax/blob/a8847bd2906efff202fde10d776fddd20fd2ff57/src/ax/ai/mock/api.ts#L31


shouldError?

optional shouldError: boolean;

Defined in: https://github.com/ax-llm/ax/blob/a8847bd2906efff202fde10d776fddd20fd2ff57/src/ax/ai/mock/api.ts#L46