Platform
Generating text with AI
Generating text with AI in Momentic tests
Momentic supports sending AI text generation requests. This feature is useful for generating certain data and interacting with an LLM.
Usage
AI text generation is currently surfaced through the JavaScript step. Within Momentic’s JavaScript sandbox, your code can access a special ai
object. This object contains the following utility function:
Sending AI generation requests
The generate
utility function allows you to prompt an LLM to generate text. The input
parameter is a string which the LLM will use as the prompt.
Was this page helpful?