AxChatRequest Generated TypeScript API reference. typescript api api/reference build/apidocs/TypeAlias.AxChatRequest.md type AxChatRequest

AxChatRequest

TypeScript
type AxChatRequest<TModel> = object;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/types.ts#L410

Type Parameters

Type ParameterDefault type
TModelstring

Properties

capabilities?

TypeScript
optional capabilities: object;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/types.ts#L517

Provider capability preferences and requirements

fallbackBehavior?

TypeScript
optional fallbackBehavior: "error" | "degrade" | "skip";

How to handle unsupported content types

requiresAudio?

TypeScript
optional requiresAudio: boolean;

Whether the request requires audio support

requiresAudioOutput?

TypeScript
optional requiresAudioOutput: boolean;

Whether the request requires generated audio responses

requiresFiles?

TypeScript
optional requiresFiles: boolean;

Whether the request requires file support

requiresImages?

TypeScript
optional requiresImages: boolean;

Whether the request requires image support

requiresWebSearch?

TypeScript
optional requiresWebSearch: boolean;

Whether the request requires web search capabilities


chatPrompt

TypeScript
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[];
  name?: string;
  role: "assistant";
  thought?: string;
  thoughtBlocks?: AxThoughtBlockItem[];
}
  | {
  cache?: boolean;
  functionId: string;
  isError?: boolean;
  result: string;
  role: "function";
})[];

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/types.ts#L411


functionCall?

TypeScript
optional functionCall: 
  | "none"
  | "auto"
  | "required"
  | {
  function: {
     name: string;
  };
  type: "function";
};

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/types.ts#L551


functions?

TypeScript
optional functions: Readonly<{
  cache?: boolean;
  description: string;
  name: string;
  parameters?: AxFunctionJSONSchema;
}>[];

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/types.ts#L544


model?

TypeScript
optional model: TModel;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/types.ts#L561


modelConfig?

TypeScript
optional modelConfig: AxModelConfig;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/types.ts#L560


processing?

TypeScript
optional processing: object;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/types.ts#L533

Content processing preferences and hints

audioTranscription?

TypeScript
optional audioTranscription: boolean;

Whether to apply audio transcription

fileTextExtraction?

TypeScript
optional fileTextExtraction: boolean;

Whether to extract text from files

imageCompression?

TypeScript
optional imageCompression: boolean;

Whether to apply image compression

urlContentFetching?

TypeScript
optional urlContentFetching: boolean;

Whether to fetch content from URLs


responseFormat?

TypeScript
optional responseFormat: object;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/ai/types.ts#L556

schema?

TypeScript
optional schema: any;

type

TypeScript
type: "json_object" | "json_schema";
Docs