function createChatOptions<TAdapter, TSchema, TStream, TTools, TInterrupts, TContext, TMiddleware>(options): Omit<TextActivityOptions<TAdapter, TSchema, TStream, InferredContext<TTools, TMiddleware>>, "middleware" | "tools" | "interrupts"> & object;Defined in: packages/ai/src/activities/chat/index.ts:594
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
TTools extends | readonly ( | Omit<Tool<any, any, any, any>, "execute"> & object & object | ProviderTool<string, TAdapter["~types"]["toolCapabilities"][number]>)[] | undefined = | readonly ( | Omit<Tool<any, any, any, any>, "execute"> & object & object | ProviderTool<string, TAdapter["~types"]["toolCapabilities"][number]>)[] | undefined
TInterrupts extends readonly InterruptDefinition<any, any, any, any, any>[] = []
TContext = unknown
TMiddleware extends unknown[] | undefined = undefined
TextActivityOptionsWithContext<TAdapter, TSchema, TStream, TTools, TInterrupts, TContext, TMiddleware>
Omit<TextActivityOptions<TAdapter, TSchema, TStream, InferredContext<TTools, TMiddleware>>, "middleware" | "tools" | "interrupts"> & object
const chatOptions = createChatOptions({
adapter: anthropicText('claude-sonnet-4-5'),
})
const stream = chat({ ...chatOptions, messages })