Usage Limits and Concurrency Limits for N/llm Methods
The content in this help topic pertains to SuiteScript 2.1.
When using the N/llm module, certain usage limits and concurrency limits apply depending on the methods you use. See the following sections for more details:
Usage Limits and How to Obtain Additional Usage
NetSuite provides a free monthly usage pool of requests for the N/llm module. Successful calls to generate methods (such as llm.generateText(options) and llm.evaluatePrompt(options)) and embed methods (such as llm.embed(options)) consume usage from this pool, and the pool is refreshed each month. Usage is tracked separately for generate methods and embed methods. You can track your current monthly usage on the AI Preferences page in NetSuite. For more information, see View SuiteScript AI Usage Limit and Usage.
Each SuiteApp installed in your account gets its own separate monthly usage pool for N/llm methods, and these SuiteApp pools are independent from the usage pool for your regular (non-SuiteApp) scripts. For example, if you install two SuiteApps, each with scripts that use N/llm methods, each SuiteApp draws from its own unique usage pool. This approach means you get twice the total SuiteApp usage (one pool per SuiteApp). Any other scripts outside of SuiteApps use a separate usage pool, and SuiteApp usage doesn't count against it. This setup ensures that SuiteApps can't use up all your monthly allocation and block your own scripts from calling N/llm methods.
When working with SuiteApps, keep the following additional considerations in mind:
-
Usage is tracked separately for generate methods and embed methods per SuiteApp.
-
SuiteApp usage tracking is not available on the AI Preferences page. It's up to each SuiteApp to provide usage information to users as appropriate.
If you want more monthly usage, you can provide the Oracle Cloud Infrastructure (OCI) credentials for an Oracle Cloud account that includes the OCI Generative AI service. When you provide these credentials, usage is drawn from the provided OCI account instead of the free usage pool. For more information, see Using Your Own OCI Configuration for SuiteScript Generative AI APIs.
Concurrency Limits
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 |
Up to five concurrent calls |
|
Embed |
Up to five concurrent calls |
|