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/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/ai/mock/api.ts#L20

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/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/ai/mock/api.ts#L28


embedModelInfo?

optional embedModelInfo: AxModelInfoWithProvider;

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


embedResponse?

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

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/ai/mock/api.ts#L37


errorMessage?

optional errorMessage: string;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/ai/mock/api.ts#L43


features?

optional features: object;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/ai/mock/api.ts#L25

functions?

optional functions: boolean;

streaming?

optional streaming: boolean;

id?

optional id: string;

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


latencyMs?

optional latencyMs: number;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/ai/mock/api.ts#L44


modelInfo?

optional modelInfo: Partial<AxModelInfoWithProvider>;

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


models?

optional models: AxAIModelList<TModelKey>;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/ai/mock/api.ts#L26


name?

optional name: string;

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


options?

optional options: AxAIServiceOptions;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/ai/mock/api.ts#L27


shouldError?

optional shouldError: boolean;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/ai/mock/api.ts#L42