axAnalyzeChatPromptRequirements
function axAnalyzeChatPromptRequirements(chatPrompt: any[]): MediaRequirements;
Defined in: https://github.com/ax-llm/ax/blob/9a5a7060a48f9eef46efc680b0cdf6b42bff5df2/src/ax/ai/processor.ts#L351
Analyzes a chat prompt to determine what media types it contains.
Scans through chat messages to identify the types of media content present, which can be used for provider capability matching and routing decisions.
Example
const requirements = axAnalyzeChatPromptRequirements([
{
role: 'user',
content: [
{ type: 'text', text: 'Analyze this:' },
{ type: 'image', image: 'base64...' },
{ type: 'file', filename: 'report.pdf' }
]
}
]);
// Result: { hasImages: true, hasAudio: false, hasFiles: true, hasUrls: false }
Parameters
Parameter | Type | Description |
---|---|---|
chatPrompt | any [] | Array of chat messages to analyze |
Returns
MediaRequirements
Object indicating which media types are present in the chat prompt