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

AxDockerSession

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/funcs/docker.ts#L56

Constructors

Constructor

new AxDockerSession(apiUrl: string): AxDockerSession;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/funcs/docker.ts#L60

Parameters

ParameterTypeDefault value
apiUrlstring'http://localhost:2375'

Returns

AxDockerSession

Methods

connectToContainer()

connectToContainer(containerId: string): Promise<void>;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/funcs/docker.ts#L186

Parameters

ParameterType
containerIdstring

Returns

Promise<void>


createContainer()

createContainer(__namedParameters: Readonly<{
  doNotPullImage?: boolean;
  imageName: string;
  tag?: string;
  volumes?: object[];
}>): Promise<{
  Id: string;
}>;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/funcs/docker.ts#L80

Parameters

ParameterType
__namedParametersReadonly<{ doNotPullImage?: boolean; imageName: string; tag?: string; volumes?: object[]; }>

Returns

Promise<{ Id: string; }>


executeCommand()

executeCommand(command: string): Promise<string>;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/funcs/docker.ts#L274

Parameters

ParameterType
commandstring

Returns

Promise<string>


findOrCreateContainer()

findOrCreateContainer(__namedParameters: Readonly<{
  doNotPullImage?: boolean;
  imageName: string;
  tag: string;
  volumes?: object[];
}>): Promise<{
  Id: string;
  isNew: boolean;
}>;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/funcs/docker.ts#L128

Parameters

ParameterType
__namedParametersReadonly<{ doNotPullImage?: boolean; imageName: string; tag: string; volumes?: object[]; }>

Returns

Promise<{ Id: string; isNew: boolean; }>


getContainerLogs()

getContainerLogs(): Promise<string>;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/funcs/docker.ts#L263

Returns

Promise<string>


listContainers()

listContainers(all: boolean): Promise<AxDockerContainer[]>;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/funcs/docker.ts#L256

Parameters

ParameterTypeDefault value
allbooleanfalse

Returns

Promise<AxDockerContainer[]>


pullImage()

pullImage(imageName: string): Promise<void>;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/funcs/docker.ts#L64

Parameters

ParameterType
imageNamestring

Returns

Promise<void>


startContainer()

startContainer(): Promise<void>;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/funcs/docker.ts#L169

Returns

Promise<void>


stopContainers()

stopContainers(__namedParameters: Readonly<{
  remove?: boolean;
  tag?: string;
  timeout?: number;
}>): Promise<object[]>;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/funcs/docker.ts#L198

Parameters

ParameterType
__namedParametersReadonly<{ remove?: boolean; tag?: string; timeout?: number; }>

Returns

Promise<object[]>


toFunction()

toFunction(): AxFunction;

Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/funcs/docker.ts#L373

Returns

AxFunction