Concurrency Limits for N/llm Methods

Note:

The content in this help topic pertains to SuiteScript 2.1.

Most methods in the N/llm module have a limit on the number of concurrent calls you can make in your scripts. You can make up to five concurrent calls to generate methods (such as llm.generateText(options) and llm.evaluatePrompt(options)) and five concurrent calls to embed methods (such as llm.embed(options)). These limits are tracked separately for generate and embed methods. If you make more than five concurrent calls to generate or embed methods, you receive an error.

The following table summarizes the concurrency limits for each method type.

Method Type

Applicable Methods

Concurrency Limit

Generate

llm.generateText(options)

Up to five concurrent calls

llm.generateText.promise(options)

llm.generateTextStreamed(options)

llm.generateTextStreamed.promise(options)

llm.evaluatePrompt(options)

llm.evaluatePrompt.promise(options)

llm.evaluatePromptStreamed(options)

llm.evaluatePromptStreamed.promise(options)

Embed

llm.embed(options)

Up to five concurrent calls

llm.embed.promise(options)

Related Topics

General Notices