function createChatOptions<TAdapter, TSchema, TStream>(options): TextActivityOptions<TAdapter, TSchema, TStream>;function createChatOptions<TAdapter, TSchema, TStream>(options): TextActivityOptions<TAdapter, TSchema, TStream>;Defined in: packages/typescript/ai/src/activities/chat/index.ts:213
Create typed options for the chat() function without executing. This is useful for pre-defining configurations with full type inference.
TAdapter extends AnyTextAdapter
TSchema extends SchemaInput | undefined = undefined
TStream extends boolean = true
TextActivityOptions<TAdapter, TSchema, TStream>
TextActivityOptions<TAdapter, TSchema, TStream>
const chatOptions = createChatOptions({
adapter: anthropicText('claude-sonnet-4-5'),
})
const stream = chat({ ...chatOptions, messages })const chatOptions = createChatOptions({
adapter: anthropicText('claude-sonnet-4-5'),
})
const stream = chat({ ...chatOptions, messages })