Docs
CodeRabbit
Cloudflare
Railway
SerpAPI
Clerk
AG Grid
OpenRouter
WorkOS
Netlify
Electric
Unkey
Prisma
Sentry
CodeRabbit
Cloudflare
Railway
SerpAPI
Clerk
AG Grid
OpenRouter
WorkOS
Netlify
Electric
Unkey
Prisma
Sentry
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