AxChatRequest
type AxChatRequest<TModel> = object;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/types.ts#L617
Type Parameters
| Type Parameter | Default type |
|---|---|
TModel | string |
Properties
capabilities?
optional capabilities: object;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/types.ts#L735
Provider capability preferences and requirements
fallbackBehavior?
optional fallbackBehavior: "error" | "degrade" | "skip";How to handle unsupported content types
requiresAudio?
optional requiresAudio: boolean;Whether the request requires audio support
requiresAudioOutput?
optional requiresAudioOutput: boolean;Whether the request requires generated audio responses
requiresFiles?
optional requiresFiles: boolean;Whether the request requires file support
requiresImages?
optional requiresImages: boolean;Whether the request requires image support
requiresWebSearch?
optional requiresWebSearch: boolean;Whether the request requires web search capabilities
chatPrompt
chatPrompt: (
| {
cache?: boolean;
content: string;
role: "system";
}
| {
cache?: boolean;
content: | string
| (
| {
cache?: boolean;
text: string;
type: "text";
}
| {
altText?: string;
cache?: boolean;
details?: ... | ... | ...;
image: string;
mimeType: string;
optimize?: ... | ... | ...;
type: "image";
}
| {
cache?: boolean;
channels?: number;
data: string;
duration?: number;
format?: AxAudioFormat;
mimeType?: string;
sampleRate?: number;
transcription?: string;
type: "audio";
}
| {
cache?: boolean;
data: string;
extractedText?: string;
filename?: string;
mimeType: string;
type: "file";
}
| {
cache?: boolean;
extractedText?: string;
filename?: string;
fileUri: string;
mimeType: string;
type: "file";
}
| {
cache?: boolean;
cachedContent?: string;
description?: string;
title?: string;
type: "url";
url: string;
})[];
name?: string;
role: "user";
}
| {
audio?: {
id: string;
transcript?: string;
};
cache?: boolean;
content?: string;
functionCalls?: object[];
images?: AxChatImageOutput[];
name?: string;
phase?: "commentary" | "final_answer";
role: "assistant";
thought?: string;
thoughtBlocks?: AxThoughtBlockItem[];
}
| {
cache?: boolean;
content?: AxFunctionResultContent;
functionId: string;
isError?: boolean;
protocolResult?: {
protocol: NonNullable<AxFunction["protocol"]>;
value: unknown;
};
result: string;
role: "function";
})[];Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/types.ts#L618
functionCall?
optional functionCall:
| "none"
| "auto"
| "required"
| {
function: {
name: string;
};
type: "function";
};Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/types.ts#L770
functions?
optional functions: Readonly<{
cache?: boolean;
description: string;
execution?: "blocking" | "background";
name: string;
parameters?: AxFunctionJSONSchema;
}>[];Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/types.ts#L762
model?
optional model: TModel;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/types.ts#L796
modelConfig?
optional modelConfig: AxModelConfig;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/types.ts#L795
processing?
optional processing: object;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/types.ts#L751
Content processing preferences and hints
audioTranscription?
optional audioTranscription: boolean;Whether to apply audio transcription
fileTextExtraction?
optional fileTextExtraction: boolean;Whether to extract text from files
imageCompression?
optional imageCompression: boolean;Whether to apply image compression
urlContentFetching?
optional urlContentFetching: boolean;Whether to fetch content from URLs
responseFormat?
optional responseFormat: object;Defined in: https://github.com/ax-llm/ax/blob/3d5aa8dac28a2637e4150f022dcd02e6fc3309f0/src/ax/ai/types.ts#L775
decisionFields?
optional decisionFields: Readonly<Record<string, AxDecisionField>>;Logical decision fields; stripped from wire JSON Schema by adapters.
fieldDescriptions?
optional fieldDescriptions: Readonly<Record<string, {
description?: string;
valueDescriptions: Readonly<Record<string, string>>;
}>>;Original per-value guidance for adapters that can represent it structurally. The standard schema’s descriptions already contain the readable guidance. These annotations are not JSON Schema keywords and are not sent as such.
schema?
optional schema: any;type
type: "json_object" | "json_schema";