Skip to main content
API Reference / @modelence/ai / generateText
generateText(options): Promise<GenerateTextResult<ToolSet, Output<any, any, any>>>
Defined in: index.ts:77 Generates text using AI models with built-in Modelence configuration and telemetry. This is a wrapper around the AI SDK’s generateText function that automatically configures providers using Modelence’s server-side configuration system.

Example

Parameters

ParameterTypeDescription
optionsGenerateTextOptionsConfiguration options for text generation

Returns

Promise<GenerateTextResult<ToolSet, Output<any, any, any>>> A promise that resolves to the generated text result