Docs
Cloudflare
Railway
CodeRabbit
OpenRouter
Clerk
WorkOS
AG Grid
SerpAPI
Netlify
Sentry
Electric
Unkey
Prisma
Cloudflare
Railway
CodeRabbit
OpenRouter
Clerk
WorkOS
AG Grid
SerpAPI
Netlify
Sentry
Electric
Unkey
Prisma
Class References
Function References
Interface References
Type Alias References
Variable References
Type Alias References

ConstrainedContent

Type Alias: ConstrainedContent<TInputModalitiesTypes>

ts
type ConstrainedContent<TInputModalitiesTypes> = 
  | string
  | null
  | ContentPartForInputModalitiesTypes<TInputModalitiesTypes>[];
type ConstrainedContent<TInputModalitiesTypes> = 
  | string
  | null
  | ContentPartForInputModalitiesTypes<TInputModalitiesTypes>[];

Defined in: packages/ai/src/types.ts:318

Type for message content constrained by supported modalities. When modalities is ['text', 'image'], only TextPart and ImagePart are allowed in the array.

Type Parameters

TInputModalitiesTypes

TInputModalitiesTypes extends InputModalitiesTypes