Understanding and Resolving Error Codes in the NetSuite N/llm Module

Explore common error codes in the NetSuite N/llm module, their causes, and how to effectively troubleshoot them.

·View Oracle Docs

When working with the N/llm module in NetSuite, developers and administrators may encounter various error codes. Here's a comprehensive guide to understanding these error codes, their triggers, and best practices for resolving them.

Common Error Codes and Solutions

SSS_MISSING_REQD_ARGUMENT

This error occurs when a required argument, specifically options.prompt, is missing in your code. Ensure that all necessary parameters are included in your llm.generateText or llm.generateTextStreamed function calls.

MUTUALLY_EXCLUSIVE_ARGUMENTS

This error is thrown when both the options.modelParameters.presencePenalty and options.modelParameters.frequencyPenalty are specified while using the COHERE_COMMAND model family. You are allowed to set a value greater than zero for one parameter, but not both. Review your function calls to adjust these settings appropriately.

UNRECOGNIZED_MODEL_PARAMETERS

This error signals that one or more model parameters are not recognized. Double-check the parameter names and ensure they match those supported by the model being used. This is particularly important when working with different LLMs that have specific accepted ranges and default values.

ONLY_API_SECRET_IS_ACCEPTED

This indicates that parameters such as options.ociConfig.privateKey or options.ociConfig.fingerprint are not valid NetSuite API secrets. Ensure your OCI configuration is correctly set up, adhering to NetSuite’s security standards.

INVALID_MODEL_FAMILY_VALUE

This error suggests that the options.modelFamily parameter is not set to a valid value. Check for typographical errors or invalid enum values and correct them to one of the supported model families.

MODEL_1_DOES_NOT_ACCEPT_PREAMBLE

The presence of the options.preamble parameter when the model does not support a preamble feature triggers this error. Review the documentation of the specific model to ensure compatibility.

INVALID_TEMPERATURE_VALUE

An incorrect temperature parameter value leads to this error. Review the accepted ranges for model parameters and set the temperature between 0 and 1, with the default being 0.2, to control response creativity.

MAXIMUM_PARALLEL_REQUESTS_LIMIT_EXCEEDED

This error arises when more than 5 requests are made simultaneously. Structure your application logic to handle requests sequentially or within the limit.

Best Practices for Error Resolution

  • Regularly Consult Documentation: Stay updated with the latest NetSuite module documentation to understand any changes or updates in error handling.
  • Structured Error Handling: Implement structured error handling in your scripts to catch and diagnose errors effectively.
  • Parameter Validation: Prioritize validating parameters against accepted ranges and default values before executing LLM calls.

Key Takeaways

  • Understanding common error codes helps in efficient troubleshooting.
  • Ensure parameters match the model's accepted ranges and defaults.
  • Follow best practices for error handling and parameter validation to minimize disruptions and improve the robustness of your integrations.
Source: Errors — Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.