AxChatSession Generated TypeScript API reference. typescript api api/reference build/apidocs/Interface.AxChatSession.md interface AxChatSession

AxChatSession

Defined in: https://github.com/ax-llm/ax/blob/e690b4823b8309e258594064abe941d4cff6ef89/src/ax/ai/session.ts#L28

Optional AxAI capability. The caller owns execution; providers own transport.

Properties

PropertyModifierTypeDescription
modelreadonlystring-
signal?readonlyAbortSignalAborts when the transport closes or fails, including between responses.

Methods

close()

TypeScript
close(): void;

Defined in: https://github.com/ax-llm/ax/blob/e690b4823b8309e258594064abe941d4cff6ef89/src/ax/ai/session.ts#L39

Returns

void


continue()

TypeScript
continue(): Promise<void>;

Defined in: https://github.com/ax-llm/ax/blob/e690b4823b8309e258594064abe941d4cff6ef89/src/ax/ai/session.ts#L34

Returns

Promise<void>


events()

TypeScript
events(): AsyncIterable<AxChatSessionEvent>;

Defined in: https://github.com/ax-llm/ax/blob/e690b4823b8309e258594064abe941d4cff6ef89/src/ax/ai/session.ts#L32

Returns

AsyncIterable<AxChatSessionEvent>


setThinkingTokenBudget()

TypeScript
setThinkingTokenBudget(level: NonNullable<undefined | "high" | "low" | "none" | "medium" | "minimal" | "highest">): Promise<"next-response">;

Defined in: https://github.com/ax-llm/ax/blob/e690b4823b8309e258594064abe941d4cff6ef89/src/ax/ai/session.ts#L36

Parameters

ParameterType
levelNonNullable<undefined | "high" | "low" | "none" | "medium" | "minimal" | "highest">

Returns

Promise<"next-response">


steer()

TypeScript
steer(text: string): Promise<"native" | "next-response">;

Defined in: https://github.com/ax-llm/ax/blob/e690b4823b8309e258594064abe941d4cff6ef89/src/ax/ai/session.ts#L35

Parameters

ParameterType
textstring

Returns

Promise<"native" | "next-response">


submitToolResults()

TypeScript
submitToolResults(results: readonly AxFunctionResult[]): Promise<void>;

Defined in: https://github.com/ax-llm/ax/blob/e690b4823b8309e258594064abe941d4cff6ef89/src/ax/ai/session.ts#L33

Parameters

ParameterType
resultsreadonly AxFunctionResult[]

Returns

Promise<void>

Docs